Posted by Aron Novak on August 29, 2011 at 8:12am
Jump to:
| Project: | Conditional Fields |
| Version: | 7.x-3.x-dev |
| Component: | Javascript |
| Category: | bug report |
| Priority: | major |
| Assigned: | Aron Novak |
| Status: | closed (fixed) |
Issue Summary
At the moment, the JS tries to set disabled attribute on outer DIV, not the form element itself. With finding the children HTML form element, i could make it work (again?).
| Attachment | Size |
|---|---|
| conditional_fields_disable_fail.patch | 559 bytes |
Comments
#1
Committed with three changes:
1. I inverted the order of the selection, so the state will continue to work when it's applied directly to the form element:
$(e.target).closest('.form-item, .form-submit, .form-wrapper')[e.value ? 'addClass' : 'removeClass']('form-disabled').find('input, select, textarea, button')
.attr('disabled', e.value);
2. Removed the useless
.filter('form-element')and filed a bug about it: #1263302: States API disabled state handler filters out nonexistent class "form-element"3. Fixed the "required" and "checked" states too, which also stopped working recently.
Thanks!
#2
Automatically closed -- issue fixed for 2 weeks with no activity.