Copy link to clipboard
Copied
I have created a fillable PDF with several input fields. What I want to happen is to create a functional button that will clear a field located on a certain page.
This is the script I used, but I am having a Syntax Error: missing ) after argument list1: at line 2.
var alert = app.alert("("This action will clear selected fields on this page.\nDo you want to continue?"",0,2);
if(alert == 4){
this.resetForm("FIELD1");
}
Copy link to clipboard
Copied
The syntax error is from the quotation marks in your app.alert line. Try this version instead:
var alert = app.alert("This action will clear selected fields on this page.\nDo you want to continue?", 0, 2);
if (alert == 4) {
this.resetForm(["FIELD1"]);
}
Make sure the field name is exact. Also, resetForm expects an array of field names, even if it’s just one
Copy link to clipboard
Copied
It's true about resetForm expecting an array, but it will also work with a string as the input.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now