By sun on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
The #collapsed property of #type 'details' has been renamed to #open and its value/meaning is negated now.
The default value of #open is FALSE, because HTML5 <details> elements are closed by default, and because <details>, as the element name implies, are supposed to contain details only.
Before
// Advanced settings, closed by default.
$form['advanced'] = array(
'#type' => 'details',
'#collapsed' => TRUE,
);
// Grouped controls, not advanced (and not to be skipped), open by default.
$form['some_group'] = array(
'#type' => 'details',
'#collapsed' => FALSE,
);
After
// Advanced settings, closed by default.
$form['advanced'] = array(
'#type' => 'details',
);
// Grouped controls, not advanced (and not to be skipped), open by default.
// Consider to use the new #type 'fieldgroup' instead.
$form['some_group'] = array(
'#type' => 'details',
'#open' => TRUE,
);
Impacts:
Module developers
Themers