Using Gravity Forms ‘gform_partialentries_post_entry_saved’ PHP action

The gform_partialentries_post_EVENT is a Gravity Forms PHP action hook that allows you to perform custom actions when a partial entry is saved or updated.

Usage

To use this action, you can hook it to your custom function like this:

add_action('gform_partialentries_post_ENTRY_EVENT', 'your_custom_function', 10, 2);

Replace ENTRY_EVENT with either entry_saved or entry_updated depending on the event you want to target.

Parameters

  • $partial_entry (Entry Object): The partial entry object.
  • $form (Form Object): The current form object.

More information

See Gravity Forms Docs: gform_partialentries_post_EVENT

Examples

Trigger Mailchimp Feeds

This example sends new partial entries to Mailchimp.

add_action('gform_partialentries_post_entry_saved', 'send_to_mailchimp_on_partial_entry_saved', 10, 2);

function send_to_mailchimp_on_partial_entry_saved($partial_entry, $form) {
    if (function_exists('gf_mailchimp')) {
        $partial_entry['status'] = 'partial';
        gf_mailchimp()->maybe_process_feed($partial_entry, $form);
        gf_feed_processor()->save()->dispatch();
    }
}

Trigger Zapier Feeds

This example sends new partial entries to Zapier.

add_action('gform_partialentries_post_entry_saved', 'send_to_zapier_on_partial_entry_saved', 10, 2);

function send_to_zapier_on_partial_entry_saved($partial_entry, $form) {
    if (class_exists('GFZapier')) {
        GFZapier::send_form_data_to_zapier($partial_entry, $form);
    } elseif (function_exists('gf_zapier')) {
        $partial_entry['status'] = 'partial';
        gf_zapier()->maybe_process_feed($partial_entry, $form);
        gf_feed_processor()->save()->dispatch();
    }
}

Trigger Webhooks Feeds

This example triggers Webhooks feeds for partial entries saved.

add_action('gform_partialentries_post_entry_saved', 'webhooks_on_partial_entry_saved', 10, 2);

function webhooks_on_partial_entry_saved($partial_entry, $form) {
    if (function_exists('gf_webhooks')) {
        gf_webhooks()->maybe_process_feed($partial_entry, $form);
        gf_feed_processor()->save()->dispatch();
    }
}

Trigger HubSpot Feeds

This example triggers HubSpot feeds for partial entries saved.

add_action('gform_partialentries_post_entry_saved', 'send_to_hubspot_on_partial_entry_saved', 10, 2);

function send_to_hubspot_on_partial_entry_saved($partial_entry, $form) {
    GFCommon::log_debug(__METHOD__ . '(): running.');

    if (function_exists('gf_hspot')) {
        $partial_entry['status'] = 'partial';
        GFCommon::log_debug(__METHOD__ . '(): trigger Hubspot for Partial Entry: ' . print_r($partial_entry, true));
        gf_hspot()->maybe_process_feed($partial_entry, $form);
        gf_feed_processor()->save()->dispatch();
    }
}

Note: Place the code in the functions.php file of your active theme.