Hide/unhide panel based on drop down from reapeating section

  • 31 March 2015
  • 6 replies
  • 7 views

Badge +4

In a repeating section I have a drop down list with all the countries of the world, as choices. I need to hide/unhide a panel based on the choice from the control with the countries. I need to unhide the panel if one of the following 4 countries is selected: Germany, Netherlands, United Kingdom and France.

I have tried with control!="Gemany" || control!="Netherlands" || control!="United Kingdom" || control!="France" ; I have also tried using not(equal()) but nothing seems to work properly.

and there's also the situation when adding the new item in the repeating section that the country could be different .. so i need to have the panel shown if at leats one of the lines contains one of the 4 mentioned countries.

 

Have you evere encountered this issue? do you have any ideas or suggestions?

 

 

thank you so so much

adriana


6 replies

Badge +9

Hi adriana

 

here is an example how to do this with two countries, You can extend it to more countries:

 

The country control is a calculated value control with formula Country where Country is the name of the Choice control in repeating section. After testing You can hide the calculated value control per css.

Preview looks like

 

Kind regards

Manfred

Badge +4


hello Manfred,

thank you so so much for your answer. such a clean and nice solution.

Thank you

It works...

Badge +4

one more thing though, if the calculated value is hidded it will not work, so i have sent it to back behind a label.

Badge +9

Do not set visible=no in control settings but give the control a CSS Class name, e.g. myhiddenfield
and add the following in form settings -> Custom CSS:

.myhiddenfield{

    visibility: hidden !important;

}

Badge +3

How would you do it for 3 possibilities?  I have this:  not(or(contains(SourceType,'School / Community Agency'), contains(SourceType, 'Family / Self'), contains(SourceType, 'Medical / PCP')))

It only works for the first two.  I feel like another "or" would be the answer?

Badge +6

Was there an answer to having three (3) possibilities? I have run into a similar situation where I have more than two, but can only get the first two to work.

Reply