These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Unique Subject Field using the Submit by E-mail button in Forms

DWalter
Registered: Jan 3 2007
Posts: 6

I have developed a form in LiveCycle which includes a 'Submit by E-mail' button. Everything works fine, except one thing...I want to know if there's a way to have a unique subject line created automatically each time a user clicks on the 'Submit' button. The reason I ask is because when people submit our form to the e-mail address specified, each of the attached forms come back with the same file name. So we are not able to save those .pdf attachments individually in the same location as they have the same name. I'm wondering if there is any scripting or something that would make this work. Please let me know...I've been searching various Acrobat sites for over a month, and are unable to find anything on this. Thank you ahead of time!

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This is a common issue. Ideally, most people would like the ability to submit uniquely named files, but your variation of changing the subject name is more doable.

There are two ways to go for a solution, and both require JavaScript. You could go the all LiveCycle route and modify the XML for the email button, or you could use the old AcroForms JavaScript submit function.

To do this all in the form's XML, select the email button in designer. Then display the form's XML by selecting the XML tab (Also in the View menu). The cursor should be at the start of the XML for the email button. Scroll down until you see the submit action. This is what has to be changed to change the subject line. To do this in code you'll need to read up on the XFA structure and the JavaScript functions for navigating it. The "resolveNode" function should get you most of the way to what you want.

Alternatively, read this article about using the submitForm function:

[url=http://www.acrobatusers.com/tutorials/2006/submitting_data]Submitting Data[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

DWalter
Registered: Jan 3 2007
Posts: 6
Thanks Thom.

I guess my question has two parts. After reading your response, I guess I am also one of those 'Idealy' people...I'm also wondering how to submit a uniquely named file when submitted via the 'Submit by E-mail' button within our form.

Thanks for all your help! I look forward to your response.