• Hello,

    I would like to execute a function that inserts into a database the name and the email that were submitted using CF7.

    Is there a way to define custom functions that are executed on successful form submission?

    I know I can hack the source code to achieve this but it will break everything upon plugin upgrade.

    So, is there a simple and upgrade-friendly way to do this?

    Any tips are more than welcome.

    Thank you!

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thanks for the info in this thread. Based on that, I created a plugin to grab posted form data and put it in a database table automatically.

    Download Contact Form 7 to Database Plugin

    Please let me know how it works for you if you try it.

    Thanks.

    Thanks Michael. Well done!

    That sounds great! I’ll give it a try in the next couple of days and let you know.

    hi how can i echo the $cf7 data??

    It seems an echo or print statement in the function causes the behavior I observed... If I simply insert into my database, it works.

    i am trying this in functions.php

    function saveFormData($cf7) {
    	$email = $cf7->posted_data["email"];
    	$name = $cf7->posted_data["name"];
    	//insert_newsletter_subscriber($email, $name);
    	echo 'test'.$email.' : '.$name;
    }

    Coul i have the code of insert_newsletter_subscriber() function .

    I’m newbie and need some sample of code to start !!

    thanks

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘[Plugin: Contact Form 7] Insert contact name and email in database after successful submission’ is closed to new replies.