Apply form states to set the field "active" as "read-only" when the "closed" field is selected

Created on 20 February 2023, over 2 years ago

Problem/Motivation

Currently there is a logic, that if the field "closed" is checked, so we can discosider the field "active" as we can see in the Drupal Behaviours "ebtAccordion"

if (drupalBlockSettings.closed != undefined && drupalBlockSettings.closed == 1) {
  options['active'] = false;
}

And it really makes sense because if the "closed" option is selected we can skip that. So makes sense apply that in the Form API as well using #states. So if the user check the "closed" we can set the "active" as read-only

Steps to reproduce

Proposed resolution

Update the Form API using the #states with that logic to apply the "read-only" (disabled) when the "closed" checkbox is checked

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Fixed

Version

1.4

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024