FieldStorageConfigEditForm should define third_party_settings element in form

Created on 19 April 2024, 5 months ago
Updated 20 April 2024, 5 months ago

Problem/Motivation

FieldConfigEditForm defines an third_party_settings element so that third party configuration settings can be set by fields or other alters.

    $form['settings'] += $item->fieldSettingsForm($form, $form_state);
    $form['third_party_settings'] = [
      '#tree' => TRUE,
      '#weight' => 11,
    ];

FieldStorageConfigEditForm does not. Since FieldStorageConfigEditForm is a subform, it's near impossible to add a custom submit handler for adding third party settings to the field storage configuration entity.

Steps to reproduce

Alter the field_storage_edit_form and try to save third party settings.

Proposed resolution

Follow the same pattern.

    $form['settings'] += $item->storageSettingsForm($form, $form_state, $this->entity->hasData());
    $form['third_party_settings'] = [
      '#tree' => TRUE,
      '#weight' => 11,
    ];

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
Field UIΒ  β†’

Last updated 5 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024