js/misc/states.js disabling all fields of webform instead of just one

Created on 8 June 2023, over 1 year ago
Updated 13 September 2024, 3 months ago

Problem/Motivation

Had a use-case with a Webform, where a field needed to be disabled based on the value selected for another field.
Adding the conditional logic resulted in all the fields being disabled when the condition was met - instead of just the one intended field.

Steps to reproduce

Drupal 9.5.9
Bootstrap 3.24
Webform 6.1.3

Proposed resolution

Remove the js/misc/states.js override.
(it seems to be there to work around a WebKit issue fixed 12 year ago?)
It just works fine without it

๐Ÿ› Bug report
Status

Closed: won't fix

Version

3.0

Component

Code

Created by

๐Ÿ‡ท๐Ÿ‡ดRomania reszli Tรขrgu Mureศ™

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

Comments & Activities

  • Issue created by @reszli
  • First commit to issue fork.
  • Open on Drupal.org โ†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Waiting for branch to pass
  • @sakthi_dev opened merge request.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sakthi_dev

    Removed the js/misc/states.js file. Please review.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States shelane

    Seems reasonable. There isn't test coverage for it, so I'm hesitant to just remove it without trying to find where else there might be an issue because of it. There are other forms besides webform. I'll look into why it was there in the first place and maybe others can chime in for different use cases and testing.

  • Status changed to Closed: won't fix 3 months ago
  • ๐Ÿ‡ต๐Ÿ‡ชPeru hatuhay Lima
Production build 0.71.5 2024