I noticed an issue where elements on multi-select dependent checkbox fields are missing the "value" attribute when the field goes from invisible to visible.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | interdiff.txt | 607 bytes | edwardchiapet |
| #3 | conditional_fields-input-missing-value-attributes-3001010-3.patch | 804 bytes | edwardchiapet |
| #2 | conditional_fields-input-missing-value-attributes-3001010-2.patch | 605 bytes | edwardchiapet |
Comments
Comment #2
edwardchiapetI investigated and it looks like the culprit is in
if (typeof $(fields).data('conditionalFieldsSavedValue') === 'undefined') {. This should beif (typeof $(this).data('conditionalFieldsSavedValue') === 'undefined') {.This patch should fix it.
Comment #3
edwardchiapetI added another update that addresses an issue where the checkbox value from being set to null when it is hidden. For reference fields (i.e., taxonomy) that are dependents, if there are values in the checkbox input, these values are set to null when the field is hidden and the value is not retained.
Comment #4
arthur.baghdasar commentedThank you for the patch. It solved my issue.
Comment #5
el1_1el commentedworking for me also. Thanks!
Comment #6
jordanddisch commentedWorked for me! Thanks for the patch!
Comment #8
colan