Description
Triggered after an incomplete form submission is saved.
Usage
add_action( 'gform_incomplete_submission_post_save', 'my_function', 10, 4 );
Parameters
Examples
1. Basic usage
function my_function($submission, $resume_token, $form, $entry) { //Do something here } add_action( 'gform_incomplete_submission_post_save', 'my_function', 10, 4 );
2. Trigger Mailchimp feed
This example shows how you can trigger the processing of a specific feed when an incomplete submission is saved.
add_action( 'gform_incomplete_submission_post_save', function ( $submission, $resume_token, $form, $entry ) { if ( function_exists( 'gf_mailchimp' ) ) { $feed = gf_mailchimp()->get_feed( '40' ); if ( ! empty( $feed ) ) { gf_mailchimp()->process_feed( $feed, $entry, $form ); } } }, 10, 4 );
3. Save token to current user
This example shows how you can the resume token to the currently logged in users profile when an incomplete submission is saved.
add_action( 'gform_incomplete_submission_post_save', function ( $submission, $resume_token, $form, $entry ) { if ( is_user_logged_in () ) { update_user_meta( get_current_user_id(), '_gf_resume_token', $resume_token ); } }, 10, 4 );
Source Code
This action hook is located in forms_model.php.