ListItemBase::storageSettingsForm() 'allowed_values' form element is missing a #type

Created on 15 April 2024, 2 months ago

Problem/Motivation

In πŸ“Œ List key|label entry field is textarea, which doesn't give guidance towards the expected input Fixed , the form for options field settings was changed, and there is an outer form element with no #type:

    $element['allowed_values'] = [
      '#element_validate' => [[static::class, 'validateAllowedValues']],
      '#field_has_data' => $has_data,
      '#allowed_values' => $allowed_values,
      '#required' => TRUE,
      '#prefix' => '<div id="' . $wrapper_id . '">',
      '#suffix' => '</div>',
      '#access' => empty($allowed_values_function),
      'help_text' => ['#markup' => $this->allowedValuesDescription()],
    ];

This causes problems.

For example, a 3rd party module can't set #states on it, because the states system expects to find a #type on a form element.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
OptionsΒ  β†’

Last updated 27 days ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom joachim

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

Comments & Activities

Production build 0.69.0 2024