Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Thanks again for your response. I placed the code on the ‘Actions’ tab. The Select trigger is set to ‘Mouse Up’ and the action is set to run javascript.
What I do not know is how to set the script to pull the Export Value as oppose to hardcoding the email address.
Copy link to clipboard
Copied
That is not a good idea... Do you want a new email to be generated each time the user clicks on the field or changes its value?
You should place this code as the MouseUp event of a button field and then you'll be able to replace the hard-coded email address with this code:
this.getField("DropDown Field Name").value
Find more inspiration, events, and resources on the new Adobe Community
Explore Now