Skip to main content
vincenth50944178
Participant
March 7, 2016
Question

How I change an email recipient using a list box in a PDF form?

  • March 7, 2016
  • 1 reply
  • 1126 views

‌I have a PDF form with a list box that consist of 6 options. The options are a list of staff and the value is there email address. When a user click on a person's name from the list box I want the form to open in outlook with the complete PDF document attached along with the recipient's email address already populated. This part of the form is working correctly. However, if I want to switch to another user in the same list box it does not reflect the new recipient when it opens in outlook. Is there a way that when I select a different recipient the email goes to that new recipient?

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
March 7, 2016

Did you enable the option to commit the selected value of the drop-down field immediately? It's under the field's Properties - Options tab.

vincenth50944178
Participant
March 8, 2016

I selected the option ‘Commit the selected value immediately,’ but it did not work. Below is what I have and is trying to accomplish:

My list Box have two entries for the ‘Items’ category and each item has an ‘Export Value,’ which is a separate email address. I have ‘Commit selected value immediately’ selected.

Example:

Item List Export Value

Vincent Harris vincentharris@comcast.net

LVOH lvoh@gmail.com

I also added the following javascript as an action:

this.mailDoc(false, "vincentharris1117@comcast.net", "", "", "Proof Approval", "Please review the attached proof for your project and use the approval form to approve this job.");

What I’m trying to accomplish is… when a user select a person’s name in the list that the email address will be pulled from the ‘Export Value’ and an email would be sent to the person the user selected from the list. That part works fine. The problem occurs when a user goes to select a different person from the list the email does not go to the newly person selected it only goes to the one email listed in the above java script. I thought by putting the email address for each Item as the Export Value that it would pull the email address for the person selected and make he/she the recipient for the email.

Is there a way to change the javascript or my settings so that the script would pull the Export Value, which is the person’s email and lists that person as the recipient in the email?

I apologize for not knowing much scripting. Thanks

try67
Community Expert
Community Expert
March 8, 2016

JS does use the export value, but it doesn't look like you're using the value of the drop-down field in your code, you just hard-coded an email address, so how do you expect it to work?

Where did you place this code, exactly?