Add IEF and entity_browser module support

Created on 3 July 2018, over 6 years ago
Updated 13 August 2024, 3 months ago

Problem/Motivation

The BlockFieldWidget does not work if it's placed inside an IEF (for example used in combination with Entity Browser).

That happens because when the form element is being constructed, values are assumed to be at the top level of the form, disregarding the element's parents:

    $values = $form_state->getValues();
    $item->plugin_id = (isset($values[$field_name][$delta]['plugin_id'])) ? $values[$field_name][$delta]['plugin_id'] : $item->plugin_id;
    if (!empty($values[$field_name][$delta]['settings'])) {
      $item->settings = $values[$field_name][$delta]['settings'];
    }
    else {
      $item->settings = $item->settings ?: [];
    }

Proposed resolution

Support the use case of the widget nested at an arbitrary level in the form hierarchy.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine voleger Ukraine, Rivne

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024