visible/hidden text field dependant on 2 checkboxes
Hi.
I have the below scenario, whereby there are two checkbox options and if yes is selected for either of them, then they need to provide details in the text field, even if no is selected in one but yes is selected in the other I need the text field to be visible, but if no is selected for both then the text fields should be hidden
I currently have this script (or something similar) in all of the checkboxes:
// fields to show and hide
var field1 = this.getField("Specify any restrictions etc and/or failure to comply with restrictions etc 1");
var field2 = this.getField("Specify any restrictions etc and/or failure to comply with restrictions etc 2");
// check box that changes visibility
if (this.getField("Check Box49").value == "Yes")
{
//hide these fields
field1.display = display.visible;
field2.display = display.visible;
}
else
{
// show these fields
field1.display = display.visible;
field2.display = display.visible;
}
This works if they select no for the first option and yes for the second. But, if they select yes for the first option and no for the second, it removes the text fields.
I'm just learning scripts in Adobe pro DC so I'd really appreciate any help I can get.
thanks
Leah

