Copy link to clipboard
Copied
Our college has 9 different locations. I've had multiple requests to create a fillable PDF that would send the completed form (Submit Button) to a location-specific email address.
I created a Location field with pull down options.
I then created a hidden WhereTo field using Javascript to get the value from Location, and assigned the mailto as a text string.
I used the standard Form Tool to create the Submit a Form button. One of the fields asks for the URL to send the form. When I have built for going to just one location, I would enter the specific mailto: address.
How can I have the button's URL field get its value from the WhereTo field?
Here's my WhereTo script:
var Location = this.getField("Location").valueAsString;
if (Location=="Connected Classroom") event.value = "mailto:library@npc.edu";
if (Location=="LCC") event.value = "mailto:lcclibrary@npc.edu";
if (Location=="PDC") event.value = "mailto:pdclibrary@npc.edu";
if (Location=="SCC") event.value = "mailto:scclibrary@npc.edu";
if (Location=="WMC") event.value = "mailto:wmclibrary@npc.edu";
if (Location=="HOPI") event.value = "mailto:hopilibrary@npc.edu";
if (Location=="KAY") event.value = "mailto:kaylibrary@npc.edu";
if (Location=="SPE") event.value = "mailto:spelibrary@npc.edu";
if (Location=="STJ") event.value = "mailto:stjlibrary@npc.edu";
if (Location=="WRV") event.value = "mailto:wrvlibrary@npc.edu";
Copy link to clipboard
Copied
You should not include the "mailto:" part in the value of the field, just the email address. Since that part repeats itself in the final URL it doesn't have to be in the value of the field.
The answer to your question can be found here: https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address
Copy link to clipboard
Copied
You should not include the "mailto:" part in the value of the field, just the email address. Since that part repeats itself in the final URL it doesn't have to be in the value of the field.
The answer to your question can be found here: https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address
Copy link to clipboard
Copied
I need to make a Mailto link to my website which is suppose to contain either the product name or the product page URL in the subject section. How can I do it?Exp: When you get an email through eBay about a product you are selling or buying, you automatically know what product that email is about by seeing the product name in the subject section.How can i do this?
Copy link to clipboard
Copied
The tutorial I linked to above explains how to include a dynamic value in one of the fields of an email. Just use the same logic for the subject line, instead of the recipient email address...
Copy link to clipboard
Copied
Can you please guide me what to do fro mobile devices, as submit form button is not working on Run Javascript action
Copy link to clipboard
Copied
The tutorial link provided, plus the note to remove the "mailto:" did the trick. Thank you to try67 for the quick and correct response.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now