Copy link to clipboard
Copied
I have a button that runs a reset form but I would like to add a Yes/No/ alert box to query the user whether they are sure they want to reset all of the form data. If Yes then procede, if no, return to the document.
Help please!
Copy link to clipboard
Copied
I did not mention that I have READ ONLY textboxes throughout that run formulas that CANNOT be erased
Copy link to clipboard
Copied
You can do it using a script:
if (app.alert("Are you sure you want to reset the form?",2,2)==4) this.resetForm();
If you want to only reset specific fields, you will need to specify their names, like this:
this.resetForm(["Text1", "Text2", "Radio3", "Checkbox4"]);
Copy link to clipboard
Copied
Thanks Try67. I figured that was probably the only way. I have 16 pages with an average of 10 boxes per page, but some pages have 30 ish boxes. A HUGE job to itemize each textbox.
I will leave it up to the user to use a button per page, that way through the button/reset form I can select the textboxes. As I'm typing this, I'm thinking, is there anyway to convert the button/reset form (once the boxes are selected) to a javascript?
Copy link to clipboard
Copied
No, that's not possible, but if you have a list of fields that you don't want to reset it's possible to write a script that will collect all the other field names in the file, and then supply that to the resetForm method as the parameter.