Turn form builder response into HTML I have a node type called "competition". I can get a form for it like so:

$values = array('type' =&gt; 'competition');
$node = \Drupal::entityTypeManager()
  -&gt;getStorage('node')
  -&gt;create($values);

$form = \Drupal::entityTypeManager()
  -&gt;getFormObject('node', 'default')
  -&gt;setEntity($node);
$form = \Drupal::formBuilder()-&gt;getForm($form);


In a controller it's easy enough to return $form and it will be rendered. But I want to do other things with this form so I need it back as HTML. How can I turn $form into fully rendered html?
I managed to use:

$html = drupal_render($form);


Just like you would do in Drupal 7. Not great, but solves my problem.