conditional-field
conditional-field copied to clipboard
Multiple keys for visibility of the same element
This is allow defining multiple inputs which control the visibility for the same element. @stevenwanderski please review the code.
Hi @Stacyy,
First of all, thanks for your work!
I have reviewed your code. It works OK in the situation that there is only one element in the visilibity string.
In the following case, the code does not handle the situation correctly:
new ConditionalField({
control: 'input[name="control_input"]',
visibility: {
'answer1': '.element-specific-for-answer-1, .element-common-for-answer1-and-2',
'answer2': '.element-specific-for-answer-2, .element-common-for-answer1-and-2'
}
});
Hi @carlosreig - thanks for the review.
I commissioned @Stacyy to add this feature, she's not currently working on my project for me to commission her to make the update so it may be a while until this gets updated (unless @Stacyy wants to fix this in her free time? 😝 )