Hello
I ve been using a multiple email form for quite a while in a previous version of chronoforms. Now i ve upgraded to 3.0 and it does not work anymore, here s where I stand now:
in the email, a basic select:
and the the subit before email, this php code
I know i wrong but i can t find where. Any help is welcome
I ve been using a multiple email form for quite a while in a previous version of chronoforms. Now i ve upgraded to 3.0 and it does not work anymore, here s where I stand now:
in the email, a basic select:
<SELECT name="departments[]" class=cf_inputbox id="departments" >
<option value="dep1">dep1</option>
<option value="dep2">dep2</option>
<option value="dep3">dep3</option>
<option value="dep4">dep4</option>
<option value="dep5">dep5</option>
</SELECT>
and the the subit before email, this php code
<?php
$emails = array(
'dep1' => 'dep1@dep1.com',
'dep2' => 'dep2@dep2.com',
'dep3' => 'dep3@dep3.com',
'dep4' => 'dep4@dep4.com',
'dep5' => 'dep5@dep5.com');
$em_array= array();
foreach ( $_POST['departments'] as $em ) {
$em_array[] = $emails[$em];
}
$emails[0]->to = implode(",", $em_array);
?>
I know i wrong but i can t find where. Any help is welcome