Hi guys,
I followed this discussion and I’d also like to implement the checkbox on my contactform. However, if I add this to the form:
[checkbox send_c default:0 "Send me a copy of this message"]
and this in the functions.php of my theme:
add_filter( 'wpcf7_additional_mail', 'my_wpcf7_use_mail_2_or_not', 10, 2 );
function my_wpcf7_use_mail_2_or_not( $additional_mail, $cf ) {
if ( "Send me a copy of this message" != $cf->posted_data['send_c'] )
$additional_mail = array();
return $additional_mail;
}
and then open the contactform in my browser, tick the checkbox and send the form. I don’t receive a copy. What am I doing wrong?