Gravity Forms Partial Entries Exporting Entries – WordPress Tutorial
Gravity Forms Partial Entries Exporting Entries – WordPress Tutorial
Last week I wrote an introduction post on Gravity Forms Partial Entries. Since then I have worked further with the client on tweaking this functionality for their needs. I mentioned in that previous article that there was not much you could do with the partial entries as far as automatically sending them to a third party and that is still true. What I didn’t realize, is there’s not even a good way to export partial form submissions in CSV form to manually import them into a third party. Well, my client really needed this functionality so I developed a bit of a work around.
First, I added a new hidden field to the form in question called “Form Submission Complete”. Next, I added the following function to my themes function.php file:
// Gravity Forms Pre-Submission function for use with Partial Entries add_action( 'gform_pre_submission', 'pre_submission_contact_page_handler' ); function pre_submission_contact_page_handler( $form ) { $_POST['input_23'] = 'Form Submitted'; }
What the above does is hooks into Gravity Forms post submission validation and adds the value “Form Submitted” to this new hidden input field I created which happens to be input number 23. Note that the initial add action of ‘gform_pre_submission’ will cause this functionality to be added to every Gravity Forms form. If you want it only added to the single form, you can use gform_pre_submission_3 where the 3 is the ID of the Gravity Form.
Now I can go export my entries by following the below steps:
Share Your Thoughts