Is it possible to send the results email to different email addresses based on the subject? For example, if they select in the drop down box "Marketing", then the results should go to [email]marketing@site.com[/email] or "Jobs" should go to [email]jobs@site.com[/email].
I've got the basic form set up pretty easily, but I'm having a hard time figuring out how to do this part.
Thanks!
Hi nomi,
Yes you can do that there are a few examples in the forums here. Basically you can set up a Switch statement in the OnSubmit beofer box that looks at the value of the field and sets the email accordingly.
Bob
Hi nomi,
the same wya, something like this :
<?php
switch ( $_POST['subject'] ) {
case 'value_1':
$rows[0]->extraemail = "1@email.com";
break
case 'value_2':
$rows[0]->extraemail = "2@email.com";
break
case 'value_3':
default:
$rows[0]->extraemail = "3@email.com";
break
}
?>
put that in the before submit box
Cheers
Max<br><br>Post edited by: admin, at: 2008/04/04 15:54
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks, Max. I appreciate it!!