• I would want to run some php code after the submission has been validated and use some of the submission field values in my code.

    I understand this could be done with javascript “on_sent_ok”, but for security reasons, I would prefer to do things server side.

    Is there an action hook that I could use to achieve this, that also passes validated form values?

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 1 replies (of 1 total)
  • You can use the filter wpcf7_validate, once all fields have been validated.

    function post_validate( $result ) {
      ...
    }
    add_filter( 'wpcf7_validate', 'post_validate' );
Viewing 1 replies (of 1 total)
  • The topic ‘Run PHP code after successful submit’ is closed to new replies.