Use submission ID to pick email address
-
Hello,
Is it possible to access the form ID before the submission is sent, or would this be handled by Zapier.
I want to have 2 “send to” emails and each one will be used alternatively. I think that the easiest way to do this would be to access the form ID and then have an if/else function that would set the email address.
Something like this…
add_filter( 'ctz_get_data_from_contact_form', 'set_email' );
function set_email( $data ) {
// SET THE EMAIL ADDRESS
if ($data['id']%2 = 0){
$data['send_to']= '[email protected];
} else {
$data['send_to']= '[email protected];
}
return $data;
}
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.