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.

Comments

edwardchiapet created an issue. See original summary.

edwardchiapet’s picture

I investigated and it looks like the culprit is in if (typeof $(fields).data('conditionalFieldsSavedValue') === 'undefined') {. This should be if (typeof $(this).data('conditionalFieldsSavedValue') === 'undefined') {.

This patch should fix it.

edwardchiapet’s picture

I 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.

arthur.baghdasar’s picture

Thank you for the patch. It solved my issue.

el1_1el’s picture

Status: Active » Reviewed & tested by the community

working for me also. Thanks!

jordanddisch’s picture

Worked for me! Thanks for the patch!

colan’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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