Can eForm email a series of people, like a tell-a-friend form with 3 email addresses to notify?
[[eForm? &formid=`TellAFriend` &sendirect=`1` &subject=`[+friend+] wants you to see this site`]]
<form name="tell" method="POST">
<input type="hidden" name="formid" value="TellAFriend">
<input type="hidden" name="email" value="[+email+]">
<input type="text" name="friend" size="20" value="[+firned+]">
<input type="text" name="tell1" size="20" onchange="updateEmail()">
<input type="text" name="tell2" size="20" onchange="updateEmail()">
<input type="text" name="tell3" size="20" onchange="updateEmail()">
<input type="submit" value="Submit" name="cmdsend">
</form>
<script>
function updateEmail() {
// get form elements
var f = document.forms['tell'];
var email = f.elements['email'];
var t1 = f.elements['tell1'];
var t2 = f.elements['tell2'];
var t3 = f.elements['tell3'];
// store emails 1 to 3 inside an array
emails = [];
emails[emails.length] = t1.value
if (t2.value) emails[emails.length] = t2.value;
if (t3.value) emails[emails.length] = t3.value;
// save emails to email field
email.value = emails.join(",");
}
</script>
mm thats sound good but dificult could you show me an example or a link?
Raymond, a quick follow up, does that send individual mails, or mails to all three at once?
Anybody here knows why vericode field is self populating when using eForm parser by TobyL ?
<label> Enter the verification code <b>[+vericode+]</b> below: * <br />
<input name="vericode" type="text" size="10" value="" />
</label># load autotext template
if (strlen($autotext)<50) {
if(is_numeric($autotext)) $autotext = ($doc=$modx->getDocument($autotext)) ? $doc['content']:"Document id '$autotext' not found.";
else if($autotext) $report = ($chunk=$modx->getChunk($autotext)) ? $chunk:"Chunk '$report' not found.";
}This discussion is closed to further replies. Keep calm and carry on.