How to save contact form 7 data in Custom Post Types (CPT) [closed]
If you want to save the Mail Content after the Contact Form was sent (or failed), you can use the wpcf7_mail_sent and wpcf7_mail_failed Hookes like this: add_action(‘wpcf7_mail_sent’,’save_my_form_data_to_my_cpt’); add_action(‘wpcf7_mail_failed’,’save_my_form_data_to_my_cpt’); function save_my_form_data_to_my_cpt($contact_form){ $submission = WPCF7_Submission::get_instance(); if (!$submission){ return; } $posted_data = $submission->get_posted_data(); //The Sent Fields are now in an array //Let’s say you got 4 Fields in … Read more