Gravity Forms Disable Entry Creation
Automatically delete a Gravity Forms entry and any associated files after the form is submitted.
What does it do?
Gravity Forms must create an entry in order to function properly. Rather than truly disabling entry creation, Gravity Forms Disable Entry Creation will automatically delete the entry and any associated files after the submission process has been completed.
Additionally, if the form has a User Registration feed, the entry will be deleted once the user has been activated, created or updated (depending on how your User Registration feed is configured).
Features
- Automatically delete entry after feeds have been processed.
Create Users without retaining data in form entries. - Conditionally disable entry creation.
Use Gravity Forms conditional logic to conditionally disable entry creation. - GDPR compliance.
Remove all personal data from entries after processing. - Seamless, easy-to-use UI.
Integrates directly with Gravity Forms settings. Activate this feature with a single click. - Automatic updates.
Get updates and latest features right in your dashboard. - Awesome support.
We’re here to help! And we mean it.
Documentation
How do I enable this functionality?
To disable entry creation for any form, just activate this perk and head to the form settings for whichever form you’re working with. Scroll down to the Entry Creation section near the bottom and check Disable entry creation.
Feature Details
Conditionally Disable Entry Creation
Entry creation can be disabled using conditional logic. After checking Disable entry creation in the form settings, a checkbox to enable conditional logic appears. Check this box and set up conditional logic like you would anywhere else in your form.
Translations
You can use the free Loco Translate plugin to create translations for any of our Perks. If you’ve never used Loco translate before, here’s a tutorial written for beginners.
Known Limitations
- Disable Entry Creation cannot be used on child forms embedded via a Nested Forms field. However, Disable Entry Creation can be used on the parent form. In this configuration, child entries will be automatically removed alongside the parent entry after the parent form has been submitted.
FAQs
Can I still access uploaded files after the entry is deleted?
Yes! By default, the entire entry and any associated files will be deleted. However, if you would like to delete the entry but keep the uploaded files, you can add this filter:
add_filter( 'gform_field_types_delete_files', function() { return array(); } );
How does this differ from Gravity Forms Data Retention feature?
Disable Entry Creation differs from the built-in Retention Policy feature in two ways:
- Disable Entry Creation can delete entries immediately. The shortest time the built-in option gives you is 1 day.
- Disable Entry Creation waits until feeds are processed before deleting entries. If the form has a User Registration feed and there are pending activations, it will wait until the activation is completed before deleting the entry. The built-in feature will delete the entry even if there is a pending activation, causing errors if the user tries to activate after the entry has been deleted.
Why are entries being deleted before certain feeds finish running?
Some Gravity Forms feeds are set to run asynchronously by the plugin developers. This means that they run alongside other feeds, instead of one after another.
In cases like that, Disable Entry Creation can delete an entry before that feed finishes running. To fix this, you can add this filter:
add_filter( 'gform_is_feed_asynchronous', function ( $is_asynchronous, $feed ) {
$target_slug = 'gravityformsaddon'; // Replace with the add-on slug (e.g. "gravityformsmailchimp")
if ( rgar( $feed, 'addon_slug' ) === $target_slug ) {
$is_asynchronous = false;
}
return $is_asynchronous;
}, 10, 2 );
You can find the add-on slug by going to the feed and looking in the URL. The slug is the “subview” query string.
Example: example.com/wp-admin/admin.php?page=gf_edit_forms&view=settings&subview=gravityformsaddon&id=1&fid=2
Need help adding filters? We go through how to manage filters and other snippets here!
Hooks
Gravity Forms has hundreds of hooks. Check out our Gravity Forms Hook Reference for the most thorough guide to Gravity Forms’ many actions and filters.
Related Resources
- Complete Guide to Gravity Forms reCAPTCHA and Gravity Forms Spam
Everything you need to know about spam prevention using Gravity Forms, including how to use reCAPTCHA and other tools. - Everything You Need to Know: Gravity Forms vs Ninja Forms
Find out everything you need to know about Gravity Forms vs Ninja Forms to see which one is right for your specific needs. - Spotlight: Building an Online Award Nomination System using Gravity Forms
Butler Trust’s complete award nomination system is worthy of its own award — and shows that you truly can customize Gravity Forms into anything.
Credits
Big shout-out to Richard Wawrzyniak for his major contributions to this plugin.