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

Message Popup when clicking Submit button

Community Beginner ,
Sep 12, 2021 Sep 12, 2021

My Submit button has mailto: email address in the Action tab. When someone presses the Submit button I want a message box to popup saying something like; “Have you checked your form? Do you want to continue with the Submit? OK – CANCEL. I have tried everything and nothing works. If I use javascript which would contain my email in it would I still need to use the Submit button that has mailto: in it. I am new at this. Does anyone have javascript I can try?

 

TOPICS
JavaScript
1.9K
Translate
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 ,
Sep 12, 2021 Sep 12, 2021

If you use script to submit then you don't need it also in a button as mailto.

Take a look at the link, focus on 'Figure 4' I belive it's exactly what you ask for.

https://acrobatusers.com/tutorials/popup_windows_part1/ 

 

Translate
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 Beginner ,
Sep 12, 2021 Sep 12, 2021

Nesa,

I tried that and got an error:
if(nRslt == 4) {

[PERSONAL INFORMATION REMOVED PER POLICY - THIS IS AN OPEN FORUM, NOT ADOBE SUPPORT, PLEASE DO NOT POST PERSONAL INFORMATION]

Translate
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 ,
Sep 12, 2021 Sep 12, 2021

There is no need to reinvent the wheel.

 

As long as the fields that use the "Required" property are not all filled in, Acrobat will refuse to send the form and display a message to the user explaining why.


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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 ,
Sep 12, 2021 Sep 12, 2021

It's not reinventing the wheel, though. They want to display their own custom message to the user, and let them decide for themselves whether to continue or not. The required fields validation doesn't do either.

Translate
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 ,
Sep 12, 2021 Sep 12, 2021

You can use this code to do it:

 

 

if (app.alert("Have you checked your form? Do you want to continue with the Submit?",2,2)==4)
this.mailDoc({cTo: "sbc707@email.com", cSubject: "Email subject line goes here", cMsg: "Email body goes here"});

 

 

You must remove all other commands associated with the button if you want it to work properly.

 

[Edit: I moved my reply from your duplicate post about this subject here. Please do not create multiple posts for the same question]

Translate
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 Beginner ,
Sep 12, 2021 Sep 12, 2021
WOW that worked. I have been trying for days, thank you for that. The
message box popped up. When I click Yes it starts to submit and a google
box pops up saying, “Sign in with google, Continue, then nothing. And on
the form the screen turns black with a white box that says, “Waiting” we
have opened a new browser tab for you to sign in, not sure what to do,
there is nothing on the screen for me to sign in to. So frustrating.

--
*Lance*


*(This e-mail was checked by McAfee Virus Scan)*
Translate
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 ,
Sep 12, 2021 Sep 12, 2021
LATEST

Check your default browser. A new tab should have opened where you need to log in to your email account.

You can also add it under Edit - Preferences - Email Accounts and then it should work more smoothly.

Translate
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