Copy link to clipboard
Copied
I'm preparing a fillable form on Acrobat Pro.
I have a radio button group with 3 options. Each radio button option will show or hide 30-35 check boxes. Is there a javascript I can add that will do this?
For a very short example:
Radio Button Choice: "C&I" will HIDE: "Check Box Cons 1-1", "Check Box Cons 1-2", "Check Box Cons 1-3" , "Check Box Cons 2-1" and SHOW "Check Box Bus 5-1", "Check Box Bus 5-2", "Check Box Bus 5-3"
Thanks for any sugguestions!
Place this script as a Mouse up Action in the concerned radiobutton:
if (event.target.value) != "Off") {
for (var i=1; i<4; i++) {
this.getField("Check Box Cons 1-" + i).display = display.hidden;
this.getField("Check Box Bus 5-" + i).display = display.visible;
}
this.getField("Check Box Cons 2-1").display = display.hidden;
}
else {
for (var i=1; i<4; i++) {
this.getField("Check Box Cons 1-" + i).display = display.visible;
this.getField("Check Box Bus 5-" + i).display = display.h
...
Copy link to clipboard
Copied
Place this script as a Mouse up Action in the concerned radiobutton:
if (event.target.value) != "Off") {
for (var i=1; i<4; i++) {
this.getField("Check Box Cons 1-" + i).display = display.hidden;
this.getField("Check Box Bus 5-" + i).display = display.visible;
}
this.getField("Check Box Cons 2-1").display = display.hidden;
}
else {
for (var i=1; i<4; i++) {
this.getField("Check Box Cons 1-" + i).display = display.visible;
this.getField("Check Box Bus 5-" + i).display = display.hidden;
}
this.getField("Check Box Cons 2-1").display = display.visible;
}
Copy link to clipboard
Copied
Use the mouse up action of all three radio buttons:
if(event.target.value=="C&I")
{
this.getField("Check Box Cons 1-1").display=display.hidden;
this.getField("Check Box Cons 1-2").display=display.hidden;
this.getField("Check Box Cons 1-3").display=display.hidden;
this.getField("Check Box Cons 2-1").display=display.hidden;
this.getField("Check Box Bus 5-1").display=display.visible;
this.getField("Check Box Bus 5-2").display=display.visible;
this.getField("Check Box Bus 5-3").display=display.visible;
}
else
{
this.getField("Check Box Cons 1-1").display=display.visible;
this.getField("Check Box Cons 1-2").display=display.visible;
this.getField("Check Box Cons 1-3").display=display.visible;
this.getField("Check Box Cons 2-1").display=display.visible;
this.getField("Check Box Bus 5-1").display=display.hidden;
this.getField("Check Box Bus 5-2").display=display.hidden;
this.getField("Check Box Bus 5-3").display=display.hidden;
}
Copy link to clipboard
Copied
YES! Perfect! Thank you so much!