Checking "Box 1" checks boxes "2", "3", etc and runs associated scripts
Hey there folks, to start off I'm brand new to Adobe Acrobat and all things JavaScript. Working on a project right now where I'm attempting to use JavaScripts to streamline the overall form. The area in question right now is a checkbox for showing additional fields to enter data. I've set it up do checking the inital box labeled "BC" will check to additional boxes "SerialID Row" and "RowExt". The script is set up as follows currently.
this.getField("SerialID Row").value = event.target.value;
this.getField("SerialID Row").readonly = (event.target.value == "Yes");
this.getField("RowExt").value = event.target.value;
this.getField("RowExt").readonly = (event.target.value == "Yes");The issue is while this does check and uncheck "SerialID Row" and "RowExt" it dosen't run those checkboxes' respective scripts. Those scripts are set up as follows. With the only difference being in the names for getField.
var checkbox = this.getField("SerialID Row")
var dropdowns = []
var num = 76
for (i = 1; i <= num; i++)
dropdowns[i] = this.getField("SerialID Row" + i)
if (checkbox.value == "Off") {
for (i = 1; i <= num; i++)
dropdowns[i].readonly = true
} else {
for (i = 1; i <= num; i++)
dropdowns[i].readonly = false
}I'm not sure where to go from here and don't know enough to try and interpert similar solutions to this issue. Any help or direction would be appreciated. As an FYI this is being done on Adobe Acrobat X Pro version 10.1.16 in case that matters. Thanks again in advance.