FORM:
<div>
<?
$array_dpto = array(
1 => "Option 1",
2 => "Option 2",
);
?>
<?php echo CActiveForm::dropDownList($contact, 'dpto',$array_dpto,array('empty' => 'Dpto','class' => 'dpto')); ?> </div>
MODEL:
if ($array_dpto == 'Option 1') {
$message->addTo('email@email.com');
$message->addTo('email2@email.com');
}
thientc
(Fal Etc)
August 29, 2014, 4:21pm
2
What do you mean bro? Try to make your question clear please
I have in my contact form, select one to choose the business department, and each department has a different email, I put in an array, but is not sending.
Example:
"Option 1" send email to email@email.com ;
"Option 1" send email to email@email.com ;
"Option 2" send email to usa@email.com ;
"Option 3" send email to thiago@email.com ;
understand?
thientc
(Fal Etc)
August 30, 2014, 11:20am
5
if ($array_dpto == 'Option 1') {
$message->addTo('email@email.com');
$message->addTo('email2@email.com');
}
And what is the class of $message?
Does your sendmail work correctly?