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

How to add "Yes" "No" and "Cancel" choices to a Submit button

New Here ,
Nov 30, 2018 Nov 30, 2018

Copy link to clipboard

Copied

I have created a pdf form with a Submit (mailto:) button.

The bosses want the users to rename the form to a certain naming format before they submit it.

So instead of "Application" as the blank form is names, they would save it as "LastName_FirstName_Date" before submitting.

Is there a way to come up with a javascript so that an alert box appears and asks "Have you saved/renamed your file (according to specs)?" and if
"Yes" it will continue to submit the complete PDF, if "No" it will come up with a "Save As" dialog, and then "Cancel".

All I've been able to do is a simple app alert, but that might be confusing.

I've tried to edit some javascripts I've found online and in this forum, but haven't the knowledge to do it properly.

Any help would be greatly appreciated.

TOPICS
PDF forms

Views

1.8K

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
1 ACCEPTED SOLUTION
Community Expert ,
Nov 30, 2018 Nov 30, 2018

Copy link to clipboard

Copied

Use this code:

var resp = app.alert("Have you saved/renamed your file (according to specs)?", 2, 3);

if (resp==4) this.mailDoc({cTo: "me@server.com"});

else if (resp==3) app.execMenuItem("SaveAs");

You can adjust the email address in line #2, of course.

View solution in original post

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 ,
Nov 30, 2018 Nov 30, 2018

Copy link to clipboard

Copied

Use this code:

var resp = app.alert("Have you saved/renamed your file (according to specs)?", 2, 3);

if (resp==4) this.mailDoc({cTo: "me@server.com"});

else if (resp==3) app.execMenuItem("SaveAs");

You can adjust the email address in line #2, of course.

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 ,
Nov 30, 2018 Nov 30, 2018

Copy link to clipboard

Copied

LATEST

Thank you!

That worked!

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