Hi, when a dependent item launch 'state:disabled' event, chosen should be updated to get disabled too.

I made a patch may help.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Do we need to check if (e.trigger) { like the code in states.js does?

capynet’s picture

Actually is not necessary. states expose these events to avoid these kind of internal checks I think.

joelpittet’s picture

Status: Needs review » Needs work

I gave this patch a try with term_merge module to see if it would help and was no luck. It is initialized as disabled. And for some reason chosen doesn't un-disable when the state changes.

bitcookie’s picture

This patch works with the Conditional Fields module and enabled/disabled. Thanks!

sukanya.ramakrishnan’s picture

Thanks, I needed a fix for this bug for 8.x, I am submitting a similar version of this patch(folder changed for js file) for 8.x here.

regards,
Sukanya

geertvd’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev
Status: Needs work » Reviewed & tested by the community

Patch in #5 worked nicely for me, haven't tried it with term_merge as it is not ported yet.

nagy.balint’s picture

Version: 8.x-2.x-dev » 7.x-2.x-dev
Status: Reviewed & tested by the community » Needs work
markhalliwell’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev
Status: Needs work » Fixed

The 7.x patch for this is now included in #2859781-5: Optimize JavaScript.

The 8.x version of this has also been simplified in that same issue.

nagy.balint’s picture

Status: Fixed » Closed (fixed)

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