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.
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.
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.
Copy link to clipboard
Copied
Thank you!
That worked!