This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wpcf7_before_send_mail', 'davevsdave_dynamic_email_based_on_dropdown' ); | |
function davevsdave_dynamic_email_based_on_dropdown( $contact_form ) { | |
//Get the form ID | |
$form_id = $contact_form->id(); | |
//If it's our form with the select dropdown, let's do something... | |
if( $form_id == 9487 ) { | |
//Get the dorpdown value - change "regarding" to the name of your select dropdown menu |