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

using form data as subject and filename

jimbo
Registered: Feb 17 2008
Posts: 5

hi

i have designed several forms for different departments to submit daily returns through email. but as it is on a daily basis its would be appreciable if i could use form data such as date to rename the filename and email subject. the clients submits their data in xml format. Is this possible and how please?

Thanks

Jimbo

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Unfortunately there is no easy way to change the name of the file that is submitted. This data file is always named after the PDF. So the only way to change the name is to Save the file to a different name on the users local hard drive before submitting.

The email subject is much easier to change. You have two choices.

1) Use JavaScript to modify the underlying XML where the subject line is stored. You can see exacty where the subject is in the XML by selecting the email submit button on your form in LiveCycle Designer and then switching to XML view. Use the "MouseDown" event to make the change.

2) Use the Acrobat JavaScript "submitForm()" function to submit the email instead of the built-in LiveCycle submit button. Like this:

event.target.submitForm();

See this article on using the submitForm function:

http://www.acrobatusers.com/tutorials/2006/submitting_data

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