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

How to add a copy of Email to field varialble

anuradha
Registered: Aug 9 2008
Posts: 3

I have created a form with a Submit button. the Sumbit button has in the url field "mailto:abc.com" . The form works well and sends the pdf to the address in the url link.

Now I want to pick up the Email_Agent field from the same form and send a copy of the Email to the address which was entered by the user.

Does anyone have a suggestion how I could accomplish this?

My Product Information:
Acrobat Pro 8.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This topic comes up a lot. Do a search on the forums to find other answers.

But basically, if you want to have this level of control over the email process you have to do it with JavaScript. There are 3 functions that will work.

1. use "doc.mailDoc()" to mail entire form, requires Reader Enabling
2. use "doc.mailForm()" to mail standard form data
3. use "doc.submitForm()" to mail form data with better control over the data format.

Each of these methods have one or more email address inputs that can be set from another field on the form like this.

var cEmail = this.getField("CustomerEmail").value;
this.mailForm({bUI:true, cTo:cEmail});

Also take a look at the artical:

http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/submitting_data/


Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

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