Pregunta

In Livecycle Designer ES2, is it possible to edit the XML of the Submit button to take data from the filled form and put it into the message body of the email? As an example, if I had the following field / values:

firstName / John
lastName / Smith
DOB / 1/1/72
email / johnsmith@gmail.com

The message body of the email would look like this:

Name: John Smith DOB: 1/1/72 Email Address: johnsmith@gmail.com

¿Fue útil?

Solución

In order to send email you can use app.mailMsg() function from AcroForms specification. Add a standard button to your form and add the following code to its click event:

//Email adressee
var cToAddr = "fillproperEmail@example.com";

//Subject
var cSubLine = "Put proper subject here";

//Body
var cBody = "Name: "+firstName.rawValue+" "+lastName.rawValue+" DOB: "+DOB.rawValue+" Email Address: "+email.rawValue;

// Send an email
event.target.app.mailMsg({bUI: true, cTo: cToAddr, cSubject: cSubLine, cMsg: cBody});

Detailes about app.mailMsg() function and similar ones you can find here: http://acrobatusers.com/tutorials/print/dynamically-setting-submit-e-mail-address

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top