Description
The gform_is_disabled_duplicate_submissions_protection filter allows you to disable duplicate submission protection. Duplicate submission protection is enabled by default for all forms.
Usage
Applies to all forms:
add_filter( 'gform_is_disabled_duplicate_submissions_protection', 'your_function_name', 10, 2 );
To target a specific form append the form id to the hook name. (format: gform_is_disabled_duplicate_submissions_protection_FORMID)
add_filter( 'gform_is_disabled_duplicate_submissions_protection_123', 'your_function_name', 10, 2 );
Parameters
- $is_disabled bool
Determines whether duplicate submission protection is disabled or enabled. - $form_id int
The ID of the form currently being processed.
Examples
Disable Duplicate Submission Protection for All Forms
add_filter( 'gform_is_disabled_duplicate_submissions_protection', '__return_true' );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This filer is located in includes/duplicate-submissions/class-gf-duplicate-submissions-handler.php
Since
The filter was added in Gravity Forms 2.5.15