ECA Form: inline entity form not recognized in specific context

Created on 4 June 2024, 24 days ago
Updated 18 June 2024, 10 days ago

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'].

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024