Form elements that contain other elements break value callbacks of form elements within them

Created on 1 March 2017, over 7 years ago
Updated 22 November 2023, 7 months ago

Problem/Motivation

See #2857051: The ProfileSelect form element breaks value callbacks of contained form elements β†’ . First thought this is special in the custom commerce FormElement but it's not, table is affected too, and it is easy to reproduce:

$form['foo'] = [
'#type' => 'table',
'#header' => ['WTF'],
];
$form['foo'][0][0] = [
'#type' => 'datetime',
'#default_value' => NULL,
'#date_increment' => 1,
'#date_timezone' => drupal_get_user_timezone(),
];

Proposed resolution

Not sure yet, but going to try and just remove the problematic line that does not replace existing values.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs work

Version

9.5

Component
FormΒ  β†’

Last updated about 6 hours ago

Created by

πŸ‡¨πŸ‡­Switzerland Berdir Switzerland

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

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.69.0 2024