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

email form to specific address based on choice in list box

levi
Registered: Jun 26 2008
Posts: 8

i am new to acrobat. i have created a form with several options in a list box. i have one submit button on the form which needs to email the form in pdf. however; the email address depends on the option chosen in the list box. for example: if "car" is chosen from the list box, the submit button should send the pdf file to kristy [at] address [dot] com. if "bus" is chosen, the submit should send the pdf file to lori [at] address [dot] com. is this possible?

an alternative would be send the email to all users in my group but have the option chosen in the list box be the subject of the email. this way the users could see who needs to process the form without opening the file.

thanks in advance.

My Product Information:
Acrobat Pro 8.0, Windows
dreid88
Registered: Jun 16 2008
Posts: 3
I would love to know how to do this as well.... an example of this would be great.
kfortier
Registered: Apr 16 2008
Posts: 1
I was wondering the same thing - I need to give the user the ability to select from a drop-down list the e-mail of who they'd like to receive the form.
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Sure it's possible. When you set up the list box (or combo box), for each item that you want to display, set up the corresponding export value as the e-mail address.

For the action (button) that causes the e-mail to be sent, use the mailDoc or mailForm JavaScript method, after using JavaScript to get the e-mail address from the selected item of the list box.

George
levi
Registered: Jun 26 2008
Posts: 8
After reading many post on this site and others, this is what i came up with and it worked. It may not be the most efficient way of coding it but it works.

var VehicleType = getField("Vehicle").value;
if(VehicleType == "Ford"){
this.mailDoc({
cTo: "john [at] address [dot] com",
cSubject: VehicleType + " request",
cMsg: "Please process " + VehicleType + " request."});
} else if((VehicleType == "Toyota")||(VehicleType == "Honda")){
this.mailDoc({
cTo: "todd [at] address [dot] com",
cSubject: VehicleType + " request",
cMsg: "Please process " + VehicleType + " request."});
} else if((VehicleType == "Nissan")||(VehicleType == "Mazda")){
this.mailDoc({
cTo: "jake [at] address [dot] com",
cSubject: VehicleType + " request",
cMsg: "Please process " + VehicleType + " request."});