Skip to content

Multiple keys for visibility of the same element#11

Open
Stacyy wants to merge 4 commits intostevenwanderski:masterfrom
Stacyy:multiple-key-for-the-same-element
Open

Multiple keys for visibility of the same element#11
Stacyy wants to merge 4 commits intostevenwanderski:masterfrom
Stacyy:multiple-key-for-the-same-element

Conversation

@Stacyy
Copy link
Copy Markdown

@Stacyy Stacyy commented Dec 7, 2017

This is allow defining multiple inputs which control the visibility for the same element.
@stevenwanderski please review the code.

@carlosreig
Copy link
Copy Markdown

carlosreig commented Dec 23, 2017

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'    
            }
          });

@lougreenwood
Copy link
Copy Markdown

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? 😝 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants