Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there any way that I can get POST data from contact form 7. I need those to store in a separate database. I think I can get these values by editing the core of the plugin, but with out that is there a way I can fetch form input values.

share|improve this question
add comment

1 Answer 1

Just hook into init and inspect the POST data:

add_action( 'init', 'wpse_59942_save_cf7_data' );

function wpse_59942_save_cf7_data()
{
    if ( 'POST' !== $_SERVER['REQUEST_METHOD'] )
    {
        return;
    }

    if ( isset ( $_POST['your_field_name'] ) )
    {
        // sanitize the data and save them to the data base.
    }
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.