Multiple Conditional Options Button No Longer Works

Created on 31 August 2023, about 1 year ago
Updated 10 May 2024, 6 months ago

Problem/Motivation

When using multiple conditions on a checkbox, only one is allowed to be selected at a time. I found that this issue was caused by Issue #3244630: Warning: Undefined array key "call" in OptionsButtons->checkBoxesHandler() β†’ . The solution found in issue #3244630 does not work for all dependency types. So instead I added a fix to their original solution that doesn't require skipping checkboxes.

Steps to reproduce

  1. Create a List (text) field (field_contact_type) with multiple values Phone and Name. Cardinality unlimited. Change the form display to Check boxes/radio buttons
  2. Create Telephone Number field.
  3. Create Name field.
  4. Create Dependency: Target field: Telephone Number. Controlled by: field_contact_type. Values input mode Insert value from widget.... Content Types, select the Phone option.
  5. Create Dependency: Target field: Name. Controlled by: field_contact_type. Values input mode Insert value from widget.... Content Types, select the Name option.
  6. Create the new content type and try selecting both Telephone Number and Name

You will notice that the first time you select a checkbox, nothing will happen. Then after this, only one can be activated at a time. If you select both, then the second one will hide the first one instead of displaying both.

Proposed resolution

Removing the change made on issue #3244630. Then applying a fix for the original issue.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mitchel432

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024