Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

mailto: using a parameter on the adobe form.

Not applicable
I'm wanting to use a submit form with a mailto: function that will mail the form to the email address in a email text box on the form. Everything I have seen uses hard coded email addresses.



mailto:myemail@hotmail.com?cc=myemail@yahoo.com

I want to

mailto:"value in email text box 1"?cc= "value in email text box 2"



Thanks in advance.



Jason
7 Replies
Not applicable
Hey Jason I am looking for the same thing. I have a txt field on my form called Manager Email and when they click submit I would like to send the email to managers email that is in the text box on the form.
pguerett
Level 10
Level 10
If you have a submit button that uses the mailto protocol you can use this command to set the URL:



ButtonName.event__click.submit.target = "mailto:" + Fieldname.rawValue + any other options to the string that you want;
Not applicable
Thanks Paul. That did the trick. Here is the code that I used for my Managers_email field that is on the form. But now I have the issue of once I push the submit button it does not check for the required fields. I did this as a click event. Im not sure what a mouseup event is as I have seen others talk about using the mouseup event.



var oDoc = event.target;

oDoc.mailDoc({

bUI: true,

cTo: "email@myemail.com;" + Managers_email.rawValue,

cCc: "email2@myemail.com",

cSubject: "New Loss Memo",

cMsg: "The attached file is a filled-out form blah blah blah."});
pguerett
Level 10
Level 10
The click is the event you should be using. The check does not happen because you did not do a submit. You could add the command form1.execValidate() before you do the email.
Not applicable
Seems I cant get it to work. I get a dialog box that says None and then it goes to send out the email. Any thoughts? I even tried form1.#subform[0].execValidate(); doing it with and without the ; for both ways.



form1.#subform[0].Button1::click - (JavaScript, client)

form1.execValidate();

var oDoc = event.target;

oDoc.mailDoc({

bUI: true,

cTo: "email@myemail.com;" + Managers_email.rawValue,

cCc: "email2@myemail.com",

cSubject: "New Loss Memo",

cMsg: "The attached file is a filled-out form blah blah blah."});
pguerett
Level 10
Level 10
Lets run a test .....in Designer add an email submit button from the Standard Object Library. Render the form and hit that button. See if any warnings about mandatory fields get shown.
Not applicable
Yep Did that also 🙂 and I do get the warnings expected. If your thinking what Im thinking is add the submit button and add an onclick event to execute the other button. I tried that also.. lol. and I also get the warning but then it proceeds to run the mailto code and send the email.. Not sure if I may have missed something or maybe my code in the submit button is missing something.