wp insert post – How to store Contact Form 7 data into CPT based on click function


Is there a way to store Contact Form 7 data into a Custom Post Type, based on a click function (instead of Submit)?

My form contains a lot of data (55 questions/input fields). I want to store all the data until question 50 into the Custom Post Type.

Question 1
Question 2

Question 50
<div class="goto_final">Go to your information</div>
Input 1
Input 2

Input 5

Is there a way to do this easily, calling a wp_insert or something. In fact insert any data that has been filled out. Any ideas on how to approach this? Any example with a random Post Type would be very awesome. Thanks a lot in advance!

Danny 1 year 2021-10-03T12:51:35-05:00 0 Answers 0 views 0

Leave an answer