Description
Overrides the number of days until incomplete submissions are purged from the database.
Note: Using this filter does not change the value displayed in the save and continue confirmation and notification messages. You would need to manually update those messages in the Confirmations and Notifications areas of the Form Settings.
Usage
add_filter( 'gform_incomplete_submissions_expiration_days', 'your_function_name' );
Parameters
- $expiration_days int
The number of days until expiration. Defaults to 30.
Example
add_filter( 'gform_incomplete_submissions_expiration_days', 'change_incomplete_submissions_expiration_days' );
function change_incomplete_submissions_expiration_days( $expiration_days ) {
GFCommon::log_debug( 'gform_incomplete_submissions_expiration_days: running.' );
$expiration_days = 90;
return $expiration_days;
}
Placement
This code should be placed in the functions.php file of your active theme or within its own plugin.
Source Code
This filter is located in forms_model.php.