Prepopulate an entity reference in an inline entity form Using Drupal 8...

I have a content type, called "Qualification". 

In Qualification is an entityreference field called "Specification Sections" (field_specification_sections). 

The entityreference (field_specification_section) field uses an inline entity form to create a node of type "Specification Text Section" (specification_text_section).

In other parts of my site, I need to be able to call the 'parent' of Specification Text Section, so there is a entityreference field called that refers back to qualification.

I need to prepopulate, the field_qualification entityreference, when I create the Specification Text Section.

I've been struggling with using hook_inline_entity_form_entity_form_alter, trying to get the field_qualification to prepopulate.

I am currently using:

function mymodule_inline_entity_form_entity_form_alter(&amp;$entity_form, &amp;$form_state) {
     // get qualification node id from request
     $nodeId = \Drupal::request()-&gt;attributes-&gt;get('node');

     // load the node entity
     $node = is_numeric($nodeId) ? \Drupal\node\Entity\Node::load($nodeId) : null;

     if ($entity_form['#entity_type'] == 'specification_text_section'){
           $form['field_qualification']['widget'][0]['target_id']['#default_value'] = $node;

    }
}


But, this is not prepopulating the field in the inline entity reference.

If I still had hair, I'd be pulling it out!

Can anyone point me in the right direction?

Thanks
I tend to use CER (Corresponding Entity References) for things like this. 

As an added benefit, you can hide the reference field on specification_text_section giving a slightly cleaner editor experience.

I have a couple of similar setups where I have IEFs on the grandparent, parent, and child, so you can create all 3 from any level and CER handles reverse reference. So, if I create a parent node, I have 2 IEFs, one for the grandparent and child, but don't show the field referencing the parent in either IEF forms.