Hi!
My colleague bought CronoForms Cookbook, and there is an example to choose e-mail according to radio button selected, but he want's to send e-mail according to selected check-boxes.
When i try this code, it only send to first check-box selected.
if user select check-boxes: first and forth, i want to send form to first(at)mail.com and forth(at)mail.com.
Thanks for help!
My colleague bought CronoForms Cookbook, and there is an example to choose e-mail according to radio button selected, but he want's to send e-mail according to selected check-boxes.
When i try this code, it only send to first check-box selected.
<?php
$check0 = JRequest::getString('check0', '', 'post');
$emails = array (
'first' => 'first@mail.com',
'second' => 'second@mail.com',
'third' => 'third@mail.com',
'forth' => 'forth@mail.com'
'fifth' => 'fifth@mail.com'
);
$email_to_use = $emails[$check0];
JRequest::setVar('email_to_use', $email_to_use);
?>
if user select check-boxes: first and forth, i want to send form to first(at)mail.com and forth(at)mail.com.
Thanks for help!