ECA Form: inline entity form not recognized in specific context
Problem/Motivation
We do have an IEF configured to show the complex form, but only if the referenced entity does not yet exist. Otherwise, it displays the reference as a table.
In that context, the \Drupal\eca_form\HookHandler::fieldWidgetSingleElementInlineEntityFormComplexFormAlter recognizes the form when the field is populated with an existing referenced entity. But if the entity reference field is empty, there is no form yet, that could be used by the 2 implemented cases, that look for either $element['inline_entity_form'] or $element['entities'][$context['delta']]['form']['inline_entity_form'].
Proposed resolution
We need a third case which looks for $element['form']['inline_entity_form'].
Edited by drupalbot