- π³πΏNew Zealand quietone
Thank you for the idea!
The proposal doesn't met the Criteria for evaluating proposed changes β . In this case, there is not demonstrated demand and support for the change.
Sometimes it is desirable to trigger a form element state on the existence of Javascript, rather than on the state of another form element. For instance, I may have a form element that is hidden by default, but displays if Javascript is enabled on a page. Currently this is only possible through custom Javascript, or kludgy workarounds.
Allow #states to accept TRUE as a valid condition, as shown in this example:
$form['options']['published_date_override_container'] = array(
'#type' => 'container',
'#attributes' => array(
// Hide this container by default.
'class' => array('element-hidden'),
),
'#states' => array(
// Show this container if Javascript is enabled.
'visible' => TRUE,
),
);
Implement proposed resolution.
None.
TRUE will be a valid condition for the #states property on form elements.
Closed: works as designed
11.0 π₯
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Thank you for the idea!
The proposal doesn't met the Criteria for evaluating proposed changes β . In this case, there is not demonstrated demand and support for the change.