• 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 2 replies - 1 through 2 (of 2 total)
  • 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 5 years, 9 months ago by valecava29.
    • This reply was modified 5 years, 9 months ago by valecava29.

    Hi guys, i need to change the way the data is store in wp db. I use phpMyAdmin to see the data that comes from a submit of CF7 form, and the problem is that on every submit it creates as many couple name-value (every couple is a new row in db) as inputs of the form that i made. I need that all of inputs goes to a single row in my DB, but separating each entry by columns (name | age | etc ..). Any advice is appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘customize cfdb7_before_send_mail’ is closed to new replies.