formBuilder()->getForm() outputs everything except the  tag in a view? When displaying my entity edit form with \Drupal::formBuilder()-&gt;getForm($form); (for a flagging attached to a node) in a View that is set to show Content with the Default display, I noticed the &lt;form&gt; tag itself is missing:
&lt;form class=&quot;flagging-myflag-edit-form flagging-form&quot; data-drupal-selector=&quot;flagging-myflag-edit-form-iq8dn9lwifq&quot; action=&quot;/flag/details/edit/MYFLAG/52&quot; method=&quot;post&quot; id=&quot;myform-myflag-edit-form--iq8dn9lWIfQ&quot; accept-charset=&quot;UTF-8&quot;&gt;
Everything between the form tags is printed properly.
&lt;/form&gt;

The &lt;form&gt; tag appears on the node page correctly, but it does not appear in the view.
So somehow, Views is filtering out the &lt;form&gt; tag, but I need to keep this tag.
This is the code I am using:
function MYMODULE_node_view(array &amp;$build, NodeInterface $node, EntityViewDisplayInterface $display, $view_mode) {
  if ($node-&gt;getType() == 'MY_CONTENT_YTPE') {
    if ($display-&gt;getComponent('my_flagging_form')) {
      $flag = \Drupal::service('flag')-&gt;getFlagById('MY_FLAG');
      $flagging_entity = \Drupal::service('flag')-&gt;getFlagging($flag, $node);
      $form = \Drupal::service('entity.manager')
        -&gt;getFormObject('flagging', 'edit')
        -&gt;setEntity($flagging_entity);
      $build['my_flagging_form'] = \Drupal::formBuilder()-&gt;getForm($form);
    }
  }
}

According to twig debugging, the custom form is being output through core/modules/system/templates/form.html.twig, but there's no form tag when output by Views (the tag does appear on the node page).
This is form.html.twig:
&lt;form{{ attributes }}&gt;
  {{ children }}
&lt;/form&gt;

EDIT: I tried to render it based on the comment of @Ales:
  $form = \Drupal::service('entity.manager')
    -&gt;getFormObject('flagging', 'edit')
    -&gt;setEntity($flagging_entity);
  $form_to_render = \Drupal::formBuilder()-&gt;getForm($form);
  $renderer = \Drupal::service('renderer');
  $build['remember_form']['#markup'] = $renderer-&gt;render($form_to_render);

This gives me the same output as my original code; the form is there, but the &lt;form&gt; tag is not...
EDIT 2: I also tried using template_node_preprocess() instead of hook_node_view():
function MYTHEME_preprocess_node__MY_CONTENT_TYPE(&amp;$variables) {
  $node = $variables['node'];
  $flag = \Drupal::service('flag')-&gt;getFlagById('MY_FLAG');
  $flagging_entity = \Drupal::service('flag')-&gt;getFlagging($flag, $node);
  $form = \Drupal::service('entity.manager')
    -&gt;getFormObject('flagging', 'edit')
    -&gt;setEntity($flagging_entity);
  $form_to_render = \Drupal::formBuilder()-&gt;getForm($form);
  $variables['MY_FLAG_form'] = $form_to_render;
}

But when I rendered this variable in my theme template, I got the same result-- the &lt;form&gt; tag appears on the node page, but not in the view that shows Content with mode full content.
Looks like views reformats rendering as a form if there are any form elements in a row. See \Drupal\views\Plugin\views\display\DisplayPluginBase::elementPreRender:
    // If form fields were found in the view, reformat the view output as a form.
    if ($view-&gt;hasFormElements()) {
      .....
    }

I guess you should see one &lt;form&gt; tag arround the entire view.
In this case a possible solution would be to create a custom views display plugin Forms, that overrides the elementPreRender method and ignores the form elements check.