Fields that are shown conditionally based on a select options field should be hidden by default, but if they are inside a fieldset that is "Collapsed by default", they are all shown until one of the select options is checked. This problem exists on a fresh install of Drupal with only core modules, the latest releases of cTools and Views, and Webform 7.x-4.7+20-dev.

Steps to reproduce

  1. Create a fieldset that is "Collapsible" and "Collapsed by default".
  2. Inside the fieldset, create a "Select Options" field with two options and no default value.
  3. Inside the fieldset, create two text fields.
  4. Create two conditions so that one of the text fields is shown when the first option is selected, and the other text field is shown when the other is selected.
  5. Navigate to the form and open the fieldset, both text fields will be shown. If you select one of the options, the appropriate text field will disappear correctly.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DanChadwick’s picture

Excellent report. Confirmed. Webform is confusing "hidden by conditional" with "hidden by collapsed fieldset". Ugh.

DanChadwick’s picture

Status: Active » Fixed
FileSize
2.42 KB

Actual visibility is no longer tested. Instead it looks for a class that means conditionally hidden in itself or any parent.

Committed to 7.x-4.x and 8.x.

  • DanChadwick committed c333257 on 8.x-4.x
    Issue #2467877 by DanChadwick: Conditional fields in collapsed fieldset...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.