Using Adobe Acrobat Pro I am filling out a form that will be used by a variety of people, each with their own team lead. I want people to be able to fill out the form, type in the email of their team lead, and then have a submit button that will submit the form to that email.
Does anyone know what javascript I need to write to accomplish this?
I tried the Submit form function of the adobe acrobat button, but it doesn't allow me to customize the Mailto: form.
Edit: I found Javascript that lets users fill in a text entry field that will then be the subject of the body once the users click the submit button. Can someone who is more savvy than I rework this so that the email address is the one based on the user's entry?
Where "MyTextField" is the earlier user text field for the subject:
var customSubject = this.getField("MyTextField").value;
var mailtoUrl = "mailto:studiosupport@qoppa.com?subject=" + customSubject;
this.submitForm({
cURL: mailtoUrl, bPDF:true
});
I'm trying to learn a bit about code as I look through this. Why would this workaround not work?
var customSubject = Tomato;
var mailtoUrl = "mailto:this.getField("MyTextField").value?subject=" + customSubject;
this.submitForm({
cURL: mailtoUrl, bPDF:true
});