Avatar

Level 4

I have been reading the numerous email submit buttons and trying many suggestions posted, including excellent sample files showing several methods to accomplish, and have not had total success with any method quite yet, I'm sure due to my lack of knowledge in this area, not due to the good examples and instructions.  The sample I found here, http://forums.adobe.com/message/2522202#2522202, is the closest to what I'm needing with 2 exceptions.

1. Need form submitted as PDF, not XML. 

2. Need subject to include a company name field

Otherwise, it seems to do just what I need.  If I make a field required in the sample, it doesn't let me submit till I complete the required.  It holds the subject, email text, etc. when converted to adobe reader extended form, and if it can be modified to send as PDF and include form field company name in subject it would be so fantastic.

The JavaScript in the sample is below.  I would greatly appreciate any help in this last hurdle in my form, thank you.


form1.page1.emailButton::click - (JavaScript, client)

// First give a messageBox with instructions

xfa.host.messageBox("This will open your email client and prepare an email for you. "

+

"Please make sure you send the email to complete the process."

+

"\n\nIf you experience any difficulties or if you are using a "

+

"web based email client, then please save this form and "

+

"manually email it to someone@acompany.ie\n\nThank you!"

, "Email Instructions", 3, 0);

xfa.host.beep("3");

// then pass instructions through to email client

var

vEmail = "someone@acompany.ie";

var

vSubject = "A9100 - Example of Email Button Script"

var

vBody = "Hi\n\nPlease find attached the completed form in xml format.\n\nRegards,\n\nNiall"

event.target.submitForm({cURL

:"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody,cSubmitAs:"XML",cCharset:"utf-8"});