• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit Search
0

Alert Box Redirect(?)

New Here ,
Feb 16, 2023 Feb 16, 2023

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!

 

TOPICS
PDF forms

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 16, 2023 Feb 16, 2023

Copy link to clipboard

Copied

I did not mention that I have READ ONLY textboxes throughout that run formulas that CANNOT be erased

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2023 Feb 16, 2023

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"]);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 16, 2023 Feb 16, 2023

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2023 Feb 16, 2023

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines