Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
API page: http://api.drupal.org/api/drupal/developer%21topics%21forms_api_referenc...
In the code example used for #states", the comment does not match the code: The settings are hidden when the checkbox is not selected.
$form['email_canceled']['settings'] = array(
'#type' => 'container',
'#states' => array(
// Hide the settings when the cancel notify checkbox is disabled.
'invisible' => array(
':input[name="email_canceled_toggle"]' => array('checked' => FALSE),
),
),
);
Comment | File | Size | Author |
---|---|---|---|
2013-04-18_1515[1].png | 17.26 KB | cconrad |
Comments
Comment #1
jhodgdonThanks! Moving to the project where the Form API reference file is located.
Comment #2
apaderno