When using #disabled Form API attribute, selects generated by HS aren't really disabled because Drupal.HierarchicalSelect.initialize JavaScript forces them to become enabled anyway, ignoring HTML attribute.
I believe that was done because fields are locked from user input before AJAX call and unlocked when the answer from server is received.
Patch proposed below adds data attribute that tells client JS not to unlock selects if we really wanted to lock them.

CommentFileSizeAuthor
hierarchical-select-disabled.patch1.18 KBiamweird

Comments

iamweird created an issue. See original summary.

stefan.r’s picture

Status: Active » Needs review

  • stefan.r committed 081043d on 7.x-3.x authored by iamweird
    Issue #2598190 by iamweird: Selects cannot be disabled programmatically
    
  • stefan.r committed f6911bb on 7.x-3.x
    Issue #2598190 by iamweird: Selects cannot be disabled programmatically
    
stefan.r’s picture

Status: Needs review » Fixed

Committed (f6911bb6b19a2c7e9e6b98f013199c5ac9b2a48b), thanks!

Status: Fixed » Closed (fixed)

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