• Resolved nmueller

    (@nmueller)


    Hello,

    How can I change the form data before sending / saving to database?
    Especially I want to edit one value of a form field before the data will be stored into the database (plugin “Contact Form 7 Database Addon – CFDB7”).
    https://ww.wp.xz.cn/plugins/contact-form-cfdb7/

    With the action “wpcf7_before_send_mail” I can change the content of the email.
    But the value will not be saved into the database.

    $mail = $contact_form->prop( ‘mail’ );
    $new_mail = str_replace( ‘[fieldname]’, ‘fieldvalue’, $mail );
    $contact_form->set_properties( array( ‘mail’ => $new_mail ) );
    return $contact_form;

    Thank you for your support!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Change data before sending / saving to database’ is closed to new replies.