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!
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