Prevent Gravity Forms Entry Creation

While you can’t currently prevent Gravity Forms from creating an entry (and you may not want to just in case it breaks something else that needs the entry information in the course of processing the form submission), you *can* delete the entry after the form has finished submitting using the gform_after_submission_{$form['id']} action hook and the Gravity Forms API.

So, if your form ID is 10, your code would be:

add_action( 'gform_after_submission_10', 'mysite_gform_after_submission_10', 10, 2 ); function mysite_gform_after_submission_10 ( $entry, $form ) {
GFAPI::delete_entry( $entry['id'] );

If you don’t want to worry about code, and want to be able to just enable this on any form you’d like by checking a box on the Form Settings page, use the Gravity Forms Utility plugin.

Disclaimer: You’ll want to check the other Gravity Forms integrations you’re using (if any), and make sure they don’t depend on a Gravity Forms entry after the form has been submitted. For example, the Gravity Forms + Stripe extension adds payment information to the entry and looks for it later. If the entry isn’t there, some of the Stripe functionality will be unavailable.

Questions? Email Me