I'm trying to send an e-mail in the CC field to a person based upon the item that is selected in a dropbox.
If a specfic item is selected I need to have the email sent to a second person otherwise the CC field is left blank.
I added a Custom Code before the EMAIL in the On Submit section of the form.
The PHP code is as follows: (I took this from an earlier post)
<?php
$form->data['cc-email'] = '';
if ( isset($form->data['checkbox_name']) && $form->data['checkbox_name'] ) {
$form->data['cc_email'] = [email]'some_email@address.com[/email]';
}
?>
I replaced the first checkbox_name with the name of my Dropbox
and the second checkbox_name with the value I'm looking for.
The [email]some_email@address.com[/email] was replaced with my e-mail.
I then placed {cc_mail} into the CC field of my form..
This doesn't seem to work.
I'm guessing I need different PHP code for a DropBox.
Can anyone assist?
Kevin
If a specfic item is selected I need to have the email sent to a second person otherwise the CC field is left blank.
I added a Custom Code before the EMAIL in the On Submit section of the form.
The PHP code is as follows: (I took this from an earlier post)
<?php
$form->data['cc-email'] = '';
if ( isset($form->data['checkbox_name']) && $form->data['checkbox_name'] ) {
$form->data['cc_email'] = [email]'some_email@address.com[/email]';
}
?>
I replaced the first checkbox_name with the name of my Dropbox
and the second checkbox_name with the value I'm looking for.
The [email]some_email@address.com[/email] was replaced with my e-mail.
I then placed {cc_mail} into the CC field of my form..
This doesn't seem to work.
I'm guessing I need different PHP code for a DropBox.
Can anyone assist?
Kevin
This topic is locked and no more replies can be posted.