bookmark_bordergform_incomplete_submission_post_save

Description

Triggered after an incomplete form submission is saved.

Usage

add_action( 'gform_incomplete_submission_post_save', 'my_function', 10, 4 );

Parameters

  • $submission array

    The submission data that was submitted.

  • $resume_token string

    Resume token that is being used for this partial entry.

  • $form array

    Contains an array of information regarding the form.

  • $entry array

    Contains the partial entry that was created.

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 );

Source Code

This action hook is located in forms_model.php