Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Submit Cancelled Dialog and Submiting by Email

Avatar

Level 1

Hello,

I've googled this one pretty carefully and have found similar issues but never a solution I could get to fix the behaviour.

I am using LiveCycle Designer ES (8.2) and have created a simple form. The goal is to use some of the collected information to modify the recipient, subject and body of the email so I am using a regular button, with Control Type = Submit (with the 'Submit To Url' textbox empty). I have coded the preSubmit event to parse the various fields and build the "mailto:" string.

In the preview tab, clicking the button will launch the email client (Outlook) and will properly set the email fields (To, Subject, Body). Clicking send will successfully send the PDF to the receipient. Outlook closes, then it happens, the dreaded "Submit Cancelled" dialog which I just cannot shake.

The last 2 lines in my preSubmit event are:

var cEmailURL = "mailto:" + cToAddr + "?subject=" + cSubLine + "&body=" + cBody;
event.target.submitForm({cURL:cEmailURL ,cSubmitAs:"PDF",cCharset:"utf-8"});

where, as stated above, all variables are initialised and have valid values. I don't have any code in any other event.

Is there something I need to do to inform the PDF that I have handled the submit myself?

Thanks in advance for any thoughts ..

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Submit by email type buttons are fine where the parameters are static and known at design time.

Where the information required for the email is dynamic and gathered from the form, I would use a regular button and have script in the click event.

Here is an example for users with Acrobat/Reader v9.1 (it uses the valdationState event):

https://acrobat.com/#d=W72hKORXoOt0CAeKEJUuqQ

Here is an example that will work with earlier versions of Acrobat/Reader:

https://acrobat.com/#d=M3oe*KTVPuco6zeZoMg6Vg

In both cases have a look at the script in the third button.

Hope that helps,

Niall

View solution in original post

9 Replies

Avatar

Correct answer by
Level 10

Hi,

Submit by email type buttons are fine where the parameters are static and known at design time.

Where the information required for the email is dynamic and gathered from the form, I would use a regular button and have script in the click event.

Here is an example for users with Acrobat/Reader v9.1 (it uses the valdationState event):

https://acrobat.com/#d=W72hKORXoOt0CAeKEJUuqQ

Here is an example that will work with earlier versions of Acrobat/Reader:

https://acrobat.com/#d=M3oe*KTVPuco6zeZoMg6Vg

In both cases have a look at the script in the third button.

Hope that helps,

Niall

Avatar

Level 1

Thanks very much Niall.

The third button option was exactly what I was after. Although what I had worked, it produced the "submit cancelled" dialog which confused me into thinking I had the correct implementation when, in fact, I did not.

Best Regards,

Avatar

Level 2

I'm having similar problem. (Using LiveCycle Designer 8.0)

When the form was submitted, it was emailed correctly, but the user was then returning to the form to be greeted by the 'Submit cancelled' message, leading them to believe the form hadn't been sent when in fact it had.

https://acrobat.com/app.html#d=YQ3nhyY8JqmGfaHohQ2VZw

When I changed the form to be more like your third button option Niall, I've obviously done something terribly wrong because it now doesn't even submit the form.

https://acrobat.com/app.html#d=AfYCeKsqtoQlSOqGb46rww

Any advise appreciated, I don't work with Forms alot so apologise for my lack of knowledge

Thanks

Ian  ihopkins@oakdaletas.org

Avatar

Level 10

Hi Ian,

I can't access either of the files. You need to publish the two files that you uploaded to Acrobat.com and then share the published URLs here.

Acrobat.com.png

Because you are using LC Designer v8, you will not be able to use the v9 example. This is because it uses a new event called validationState and a new method called cancelAction.

This is a link to the example for earlier versions of LC Designer/Acrobat/Reader: http://www.assuredynamics.com/index.php/category/portfolio/email-script-v8-and-below/

If you publish the files I will have a look at them when I can.

Niall

Avatar

Level 2

Hi Niall

Hope I've published it right this time.

This is the original file

https://acrobat.com/#d=YQ3nhyY8JqmGfaHohQ2VZw

This is the one that I changed incorrectly

https://acrobat.com/#d=AfYCeKsqtoQlSOqGb46rww

I'll have a look at your other link and try to figure it out if successful I'll let you know

Thanks

Ian

P Please consider the environment before printing this e-mail

The contents of this electronic mail message, and any attachments to it, are confidential and may be protected by professional privilege and the Privacy Act (2001).

If you have received this email in error please contact Oakdale Services Tasmania by return email or phone. Please accept our apologies for the error and delete this email as any unauthorised use is strictly prohibited and may result in legal action.

Avatar

Level 2

Hi again Niall

Just opened that link and that is the document I used to base the changes on using the 3rd button option, so I've definitely stuffed something up.

Regards

Ian

 Please consider the environment before printing this e-mail

The contents of this electronic mail message, and any attachments to it, are confidential and may be protected by professional privilege and the Privacy Act (2001).

 

If you have received this email in error please contact Oakdale Services Tasmania by return email or phone. Please accept our apologies for the error and delete this email as any unauthorised use is strictly prohibited and may result in legal action.

Avatar

Level 10

Hi Ian,

For the email button, you have the script in the preSubmit event. This is not going to work.

Just take all of the script and paste it into the click event of the email button and change the language to Javascript.

Let me know if you still have problems and I will upload this version.

Good luck,

Niall

Assure Dynamics

Avatar

Level 2

Hi Niall

Thanks very much for your support, I really am very much an amateur here.

I think I have the form working now but still to test it on another machine so fingers crossed.

I don't know that I resolved it in a proper way as I couldn't find a 'click event' so I just changed the 'pre-submit' to a 'click event'.

I hope to learn a lot more about coding forms in the year, but am a little bit out of my depth.

Thanks again

Regards

Ian

 Please consider the environment before printing this e-mail

The contents of this electronic mail message, and any attachments to it, are confidential and may be protected by professional privilege and the Privacy Act (2001).

 

If you have received this email in error please contact Oakdale Services Tasmania by return email or phone. Please accept our apologies for the error and delete this email as any unauthorised use is strictly prohibited and may result in legal action.

Avatar

Level 10

Hi Ian,

Here is the form back to you: https://acrobat.com/#d=AuUvDuZHti8zxV-Gs7IHIg

When you select the email button go to the Script Editor and you will see a dropdown listing all of the available events for that object. The * indicates events that have script in them:

Parallels Desktop1.png

Hope that helps,

Niall

Assure Dynamics