These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Hiding Button if Conditions are met

uschad
Registered: Mar 3 2010
Posts: 19

I have a form that has 3 drop down boxes with options 1,2 and 3 in them. I want to hide a button if "1" is selected for either of the 3 drop down boxes. But the problem is I want it to re appear if the user changes their mind and wants to select 2 or 3. So at no point and time do I want the button visible if "1" is selected. But I do want it visible if none of the boxes have "1".

Thanks in advance for taking the time to help.

Float
Registered: Aug 15 2008
Posts: 20
Try this in the change event of your dropdown field:

if ($.boundItem(xfa.event.newText) == "1") {
this.resolveNode("Subform.YourButton").presence = "hidden";
}
else{
this.resolveNode("Subform.YourButton").presence = "visible";
}
uschad
Registered: Mar 3 2010
Posts: 19
Yeah I had tried that route before. The issue with this is when you select "1" under the first drop down box the button disappears like it should. But with this same script on each of the three drop down boxes when you go to the second drop box and select 2 or 3 the button reappears. I do not want it to show up at all if "1" is in any box.

Thanks for the help again.