How to get parent node values on inline entity form hook alter? I am using inline entity forms to create a paragraph in a node form. When I add a node I want the title of the node form to be copied to the paragraph when I click on "Add paragraph". I use hook_inline_entity_form_entity_form_alter to prefill the title field. That works, only I can't get the values from the node form. Not with the below code.

function example_forms_inline_entity_form_entity_form_alter(&amp;$entity_form, &amp;$form_state) {
  $node = $form_state-&gt;getFormObject()-&gt;getEntity();
  if ($node-&gt;getType() == "task" &amp;&amp; $entity_form['#bundle'] == "improvement") {
    \Drupal::logger('Form state values')-&gt;debug("&lt;pre&gt;" . print_r($form_state-&gt;getValues(), TRUE) . "&lt;/pre&gt;");
    \Drupal::logger('Node values')-&gt;debug("&lt;pre&gt;" . print_r($node, TRUE) . "&lt;/pre&gt;");
    $entity_form['title']['widget'][0]['value']['#default_value'] = 'This is Jessica';
  }
}


Can someone help me solve this?
Perhaps you should try altering the paragraph form instead. When the paragraph is created, you will have access to it's host entity. Then just get the label of the host entity and assign it to the form element as a default value or value(can't remember which one).