Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Email with Subject Line containing Fields from Form

Avatar

Former Community Member
Hello everyone.

I need help with the email portion of my form. I want the subject line to include the following fields LastName and FirstName and Date from my PDF form.

Any guidance would be appreciated.
2 Replies

Avatar

Level 5
Here is the JavaScript Code for emailing:



event.target.mailDoc(false,To, CC, Bcc, subject, body);



Example:

event.target.mailDoc(false,"test@test.com", "", "", LastName.rawValue+" "+FirstName.rawValue+" "+Date.rawValue, "Here goes the message of the email");



Hope this helps.



Good Luck,

SekharN

Avatar

Former Community Member
SekharN -- thanks for the speedy reply.



I must be a complete moron because I cannot get your code to work. As soon as I cut and paste the LastName.rawValue (etc) portion into my script, it does nothing. If I take out the LastName (etc) part, the email works -- but not the way I want it.



What am I doing wrong?



Also, as a sub question --- how do I change the name of the PDF file. I would like that to be a combination of Lastname, firstname, etc