- π¬π§United Kingdom joachim
Looking at #1180992: [D8] list_field_validate() doesn't seem to accommodate select lists with β this is maybe fixed?
I created a new list which outputs a select list with options grouped by optgroups.
Field label: Test
Field machine_name: field_test1
Field's options are listed correctly in the node add/edit forms.
But whenever the node is saved, the form returns an error: Test: illegal value.
Here is the code I use in my module:
function mymodule_list_option_info() {
$info['trackssessions'] = array(
'label' => t('ASCA Tracks & Sessions'),
'callback' => 'mymodule_list_option_trackssessions',
);
return $info;
}
function mymodule_list_option_trackssessions() {
return array(
'Track 1' => array(
0 => 'Session 1',
1 => 'Session 2',
2 => 'Session 3',
),
'Track 2' => array(
3 => 'Session 4',
4 => 'Session 5',
),
'Track 3' => array(
5 => 'Session 6',
6 => 'Session 7',
),
);
}
Postponed: needs info
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Looking at #1180992: [D8] list_field_validate() doesn't seem to accommodate select lists with β this is maybe fixed?