ECA Form: inline entity form not recognized in specific context

Created on 4 June 2024, 6 months ago
Updated 18 June 2024, 5 months 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.71.5 2024