Im trying to build a form that emails the form submission to a different person based on a selection list.
For example, the question reads:
I would like more information on:
- Real Estate
- Membership
- Choice 3
- Choice 4
If someone chooses option 1, a copy of the form is emailed to department 1, if option 2, a copy goes to department #2, etc.
Is something like this possible? Any help would be greatly apreciated.
Thanks🙂
Possible, in the onsubmit before email :
<?php
if($_POST['real_estate_field']){
$rows[0]->extraemail .= "rea_estate@yourdomain.com";
}
?>
and so...
Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi, sorry my mistake, make this line like this :
$rows[0]->extraemail .= ",rea_estate@yourdomain.com";
cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max, thank you again for your reply. Still no dice on the extra E-mails coming in. The primary E-mail is receiving everything fine, just not the ones in here:
<?php
if($_POST['membership']){
$rows[0]->extraemail .= ",email@domain.com";
}
?>
Any other ideas? Thank you
Bob I think you nailed it! Thank you for the excellent support🙂
Bob, wanted to follow up. Is it possible to get the code above to work with a checkbox scenario so it's easier for users to make multiple selections?
Hi mancourt,
Yes. Collect the checkbox replies in an array and then run through the array and add an email address for each entry in there.
Bob
Bob, you've already helped me out enough on this one, but could someone help me on building an "array" to make this possible?