Jump to content
  • 0

Acknowledgement Email Multiple Emails Via Parameters


flosie0901

Question

I want to send an acknowledgement email to two parameters when a form is submitted, and also a third if that field is not blank. Two are cascading text fields that auto complete if available, and the other is filled in if the user submitting the request is not the person to whom this email belongs and enters their own email.

 

Basically it is:

Regional Manager

Manager

Submitter (this may or may not be a blank field)

 

How do I send the acknowledgement email to all three, if all three are available- or at least to however many are available.

 

Thanks!

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi Flosie,

 

How are you doing?

 

I think, you can use the following steps:

Add a Virtual field and select a Hidden FormElement for it, then add the Header&Footer element, select the Footer, click the Source button and enter the code:

<SCRIPT LANGUAGE="JavaScript">
function emails()
{
var Regional_Manager = "Regional_Manager";
var Manager = "Manager";
var Submitter = "Submitter";

Regional_Manager = "InsertRecord" + Regional_Manager;
Manager = "InsertRecord" + Manager;
Submitter = "InsertRecord" + Submitter;

var email_Regional_Manager = document.getElementsByName(Regional_Manager)[0].value;
var email_Manager = document.getElementsByName(Manager)[0].value;
var email_Submitter = document.getElementsByName(Submitter)[0].value;

var emailsList = email_Regional_Manager + ";" + email_Manager;
if (email_Submitter.length>3) result_email = emailsList + ";" + email_Submitter;

document.getElementById("cbParamVirtual1").value = emailsList;
}
document.getElementById("caspioform").onsubmit=emails;
</SCRIPT>

And then select your Virtual field as an address for your Acknowledgment email.

Please note, if the Virtual Field is not the first, you should change the "cbParamVirtual1" to the correspond number, for example, to "cbParamVirtual3".

 

Could you please let me know, if it works? :)

 

Have a nice week-end!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...