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.
I want to
mailto:"value in email text box 1"?cc= "value in email text box 2"
Thanks in advance.
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.
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;
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.
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.
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.execValidate(); doing it with and without the ; for both ways.
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.
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.