Example code for "#states" contains ambiguous wording

Created on 18 April 2013, about 11 years ago
Updated 29 January 2023, over 1 year ago

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),
      ),
    ),
  );
🐛 Bug report
Status

Active

Component

API documentation files

Created by

🇸🇪Sweden cconrad

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