Hi
I am VERY new to Acrobat and JavaScript so forgive me if this is simple!
At the bottom of my form I have 19 hidden text boxes called Action1, Action2 etc
When my user checks a check box, I want to be able to determine what the next available TextBox is, make it visible and populate it.
I'm using the following code but it's not working, so any assistance would be greatly accepted!
var sum = 0;
for ( i = 0; i < 20; i++ ) {
f = "Action" + ( i == 0? "" : i ) + "[0]";
if (getField( f ).valueAsString) {sum += 1;}
}
sum += 1
getField("Section" + sum).display=display.visible;
getField("Section" + sum).value="1a";
getField("Action" + sum).display=display.visible;
getField("Action" + sum).value="Any valid text";
Thanks
Steve
I am VERY new to Acrobat and JavaScript so forgive me if this is simple!
At the bottom of my form I have 19 hidden text boxes called Action1, Action2 etc
When my user checks a check box, I want to be able to determine what the next available TextBox is, make it visible and populate it.
I'm using the following code but it's not working, so any assistance would be greatly accepted!
var sum = 0;
for ( i = 0; i < 20; i++ ) {
f = "Action" + ( i == 0? "" : i ) + "[0]";
if (getField( f ).valueAsString) {sum += 1;}
}
sum += 1
getField("Section" + sum).display=display.visible;
getField("Section" + sum).value="1a";
getField("Action" + sum).display=display.visible;
getField("Action" + sum).value="Any valid text";
Thanks
Steve