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