Copy link to clipboard
Copied
I have a Clear Form. I have fields that are visible only if a specific check box is checked. If I check that check box (the hidden fields now become visible), but then I clear the form and the fields that are supposed to be hidden are still visible despite the check box not being checked anymore. Is there anyway I can fix this? Below is the script I am using in regards to the check box. Thank you!
var f = this.getField("Check Box 1");
if(f.isBoxChecked(0)){
this.getField("Field 1").display = display.visible;
this.getField("Field 2").display = display.visible;
this.getField("Field 3").display = display.visible;
this.getField("Field 4").display = display.visible;
this.getField("Field 5").display = display.visible;
this.getField("Field 6").display = display.visible;
this.getField("Field 7").display = display.visible;
this.getField("Field 8").display = display.visible;
}
else {
this.getField("Field 1").display = display.hidden;
this.getField("Field 2").display = display.hidden;
this.getField("Field 3").display = display.hidden
this.getField("Field 4").display = display.hidden;
this.getField("Field 5").display = display.hidden;
this.getField("Field 6").display = display.hidden
this.getField("Field 7").display = display.hidden
this.getField("Field 8").display = display.hidden
}
You need to create your own Reset Form button and use it to make those
fields hidden when it's clicked, as well as actually resetting the form.
On Thu, Dec 15, 2016 at 6:16 PM, chughes919 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
You need to create your own Reset Form button and use it to make those
fields hidden when it's clicked, as well as actually resetting the form.
On Thu, Dec 15, 2016 at 6:16 PM, chughes919 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Hi.
You should use the form field naming convention (the dot really matters):
field.1
field.2
field.3
etc.
So you will just have to use one line of JavaScript to catch all fields:
this.getField("Field").display = display.visible;
or
this.getField("Field").display = display.hidden;