Edit a form retrieved using FormBuilder::getForm() I found out how to get a node creation form, but I want to display and modify it (e.g. delete some fields I don't need).

This is my code.

public function buildForm(array $form, FormStateInterface $form_state) {
  $entity = \Drupal::entityManager()-&gt;getStorage('node')-&gt;create(array(
    'type' =&gt; node_type_load('friterie')-&gt;id(),
  ));
  // OPTIONAL - Set default values for node fields
  // $entity-&gt;set('field_machine_name', "value");
  $node_create_form = \Drupal::service('entity.form_builder')-&gt;getForm($entity);

  // I can display it with this method, but I don't know how to delete
  // some fields.
  $form['friterie'] = array(
    '#type' =&gt; 'markup',
    '#markup' =&gt; render($node_create_form),
    '#prefix' =&gt; '&lt;div id="friterie-form"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;'
  );
  return $form;
}
I see two approaches here: 


You will have to use "hook_form_alter", or a more strict form alter (for example: hook_form_FORM_ID_alter()). You can remove any elements there (calling from you .module file). 
When you get back your form object ($node_create_form) which will be rendered later on, you could make changes on that specific object witt it's public methods! Just dpm, or kint the object (with devel module enabled), and you will able the find the right method to alter the form elements you are about to render. 




Side note: I highly discourage you from using "\Drupal::..." static service calls. FormBase classes are implementing the ContainerInjectionInterface, which means, in public static create function you can pass the services you need. Read more on this here!