Hello,
I have created a form using Acrobat 9 Pro (LiveCycle Designer) and everything worked as it was supposed to using a submit button I created so the client can send the form as an attachment versus just the data. However I would like to change the behavior of the email to include wording plus data from 3 text fields in the subject line as well as a default message within the body of the email.
As an example, I would like to have the subject line read {customer field = SWA; effectivity field = YT111; line # field = 5888}:
Ordering Panels for - SWA YT111 L/N 5888
And the message within the body of the email to read:
Form Returned: 737NG Rudder Rework - Ordering Panels.pdf
The attached file is the filled-out form. Please open it to review the data.
I am new to using JavaScript so have been searching the forums and thought I had found my answer however I am doing something wrong as nothing happens when I click the submit button. Will someone please take a look at my code and tell me what I need to do to fix it?
I created a button with the control set to Regular. The Language set to JavaScript and the Run At set to Client. The script editor opened with the first line of text already there: form1.#subform[0]…. and I added the rest starting with var mailto –
NOTE: The email address is for testing purposes only. I will be adding the actual Distribution List when I can get this to work correctly.
form1.#subform[0].Button1::click - (JavaScript, client)
var mailto = "soccerchick1369@gmail.com";
var subject = "Ordering Panels for -" + Customer.raw.Value, Effectivity.raw.Value, "L/N" + Line#.raw.Value;
var body = "Form Returned: 737NG Rudder Rework - Ordering Panels.pdf",
"The attached file is the filled-out form. Please open it to review the data.";
var mail="mailto:"+mailto+"?subject="+subject+"&body="+body;
event.target.submitForm({
cURL:mail,
bEmpty:true,
cSubmitAs:"PDF"
});
Thank you.