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

Changing the name of .fdf file when sent automatically via form submit

gwh
Registered: May 19 2008
Posts: 47

Hi everyone,

I've created a form in acrobat and have used the mailForm() function to automatically email the .fdf file to an email address when the submit button is pressed. I've noticed however that when the .fdf file is attached, Acrobat names the file with a generic file name, eg. ACR5037112.fdf so I wondered if there is a way to automatically name the fdf file with the contents of one of the fields in the form? For example one of the fields asks for a company name, so I wanted the value of the company name text field to automatically be used as the name of the .fdf file.

Is this possible, and if so can someone tell me how this would be coded?

Thanks in advance for any help offered.

My Product Information:
Acrobat Pro 7.0.9, Macintosh
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This is possible but not easy and the methodology is not suitable for general use.

While the mailForm fucntion creates somwhat random names, the submitForm function uses the name of the PDF file. You can force a name change by saving the file to a different name before submitting.

this.submitForm("mailto:me [at] my [dot] com");

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