Hello,
i have a Form with 2 Checkboxes:
Webmaster
Pastor
Depending on which checkbox is selected, an e-mail to the "Webmaster" or "pastor" is sent.
I have did it with the following Code (On Submit code - before sending email:)
When i select the Checkbox "Webmaster", the E-Mail is send to the Webmaster.
Exactly the same is, when i select the Checkbox "pastor" the E-Mail is sent to the Pastor.
This works very well.
My Problem is, when i selct both no E-Mail where send. What could be wrong?
Regards
Blondie
P.S: Sorry for my bad English....
i have a Form with 2 Checkboxes:
Webmaster
Pastor
Depending on which checkbox is selected, an e-mail to the "Webmaster" or "pastor" is sent.
I have did it with the following Code (On Submit code - before sending email:)
<?php
$MyForm =& CFChronoForm::getInstance("$formname");
$MyFormEmails =& CFEMails::getInstance($MyForm->formrow->id);
$copyme = JRequest::getVar('check0', array(), 'POST', 'array', 0);
if (in_array('Webmaster', $copyme))
{
$MyFormEmails->setEmailData(1, 'enabled', '1');
}
if (in_array('Pastor', $copyme))
{
$MyFormEmails->setEmailData(2, 'enabled', '1');
}
?>
When i select the Checkbox "Webmaster", the E-Mail is send to the Webmaster.
Exactly the same is, when i select the Checkbox "pastor" the E-Mail is sent to the Pastor.
This works very well.
My Problem is, when i selct both no E-Mail where send. What could be wrong?
Regards
Blondie
P.S: Sorry for my bad English....