Support » Plugin: Advanced Contact form 7 DB » customize cfdb7_before_send_mail

  • in cfdb7_before_send_mail where the data is being inserted

    $cfdb->insert( $table_name, array(
                'form_post_id' => $form_post_id,
                'form_value'   => $form_value,
                'form_date'    => $form_date
            ) );

    I need do some manipulation on field data. So how can I do it using my theme. I want to check some conditions and can be insert only if that condition is true otherwise not. I don’t want to do this in plugin’s main file

Viewing 1 replies (of 1 total)
  • valecava29

    (@valecava29)

    I use this

    add_action( ‘wpcf7_before_send_mail’, ‘wpcf7_change_recipient’,1 );

    function wpcf7_change_recipient($contact_form){

    $id= $_POST[‘_wpcf7’];
    $mail = $contact_form->prop( ‘mail’ );

    if ($id == 671){

    …..

    $contact_form->set_properties(array(‘mail’=>$mail));

    }
    return ($contact_form);
    }

    • This reply was modified 3 months ago by valecava29.
    • This reply was modified 3 months ago by valecava29.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.