gform_{$SHORT_SLUG}_field_value

gform_{$SHORT_SLUG}_field_value

DescriptionShort Slug ValuesUsageParametersExamples1. ActiveCampaign – Use Choice Text Instead of Value2. ActiveCampaign – Replace Commas with Pipes3. Emma – Format Checkbox Field4. Help Scout – Change Value of Specific Field5. Zoho CRM – Format Date Field6. Zoho CRM – Format Checkbox FieldPlacementSinceSource Code

Description
This filter can be used to modify a value before it is sent to a third-party by one of the Add-On Framework based add-ons. If you want to filter the value for any add-on you can use gform_addon_field_value.
Short Slug Values
The Gravity Forms Add-On Slugs article lists the available short slugs to use with this hook:
The following add-ons listed in the slug article do not use the hook:

Gravity Forms CLI Add-On
Gravity Forms Debug Add-On
Gravity Forms Gutenberg Add-On

The Zapier Add-On implements its own version of the hook:

gform_zapier_field_value

Usage
The base filter which would run for all forms and all fields would be used like so:
1add_filter( 'gform_helpscout_field_value', 'your_function_name', 10, 4 );
To target a specific form append the form id to the hook name. (format: gform_{$SHORT_SLUG}_field_value_FORMID)
1add_filter( 'gform_helpscout_field_value_10', 'your_function_name', 10, 4 );
To target a specific field append both the form id and the field id to the hook name. (format: gform_{$SHORT_SLUG}_field_value_FORMID_FIELDID)
1add_filter( 'gform_helpscout_field_value_10_3', 'your_function_name', 10, 4 );

Parameters

$value string
The value to be modified.

$form Form Object
The form currently being processed.

$entry Entry Object
The entry currently being processed.

$field_id string
The ID of the field currently being processed.

Examples
1. ActiveCampaign – Use Choice Text Instead of Value
This example shows how you can replace the value of a choice based survey field with the choice text.
1234567891011add_filter( 'gform_activecampaign_field_value', 'gf_get_choice_text', 10, 4 );function gf_get_choice_text( $value, $form, $entry, $field_id ) {    gf_activecampaign()->log_debug( __METHOD__ . '(): running.' );    $field = GFAPI::get_field( $form, $field_id );     if ( is_object( $field ) && $field->type == 'survey' ) {        $value = $field->get_value_export( $entry, $field_id, true );        gf_activecampaign()->log_debug( __METHOD__ . '(): Value: ' . $value );    }    return $value;}
2. ActiveCampaign – Replace Commas with Pipes
This example shows how you can replace the commas used to separate checkbox or multi select choices with pipe characters.
123456789101112add_filter( 'gform_activecampaign_field_value', 'gf_replace_commas_with_pipes', 10, 4 );function gf_replace_commas_with_pipes( $value, $form, $entry, $field_id ) {    gf_activecampaign()->log_debug( __METHOD__ . '(): running.' );    $field = GFAPI::get_field( $form, $field_id );     if ( is_object( $field ) && ( $field->type == 'checkbox' || $field->type == 'multiselect' ) ) {        $value = str_replace( ', ', '||', $value );        gf_activecampaign()->log_debug( __METHOD__ . '(): Value: ' . $value );    }     return $value;}
3. Emma – Format Checkbox Field
This example shows how you can reformat the checkbox field value to be passed as an array instead of a string.
123456789add_filter( 'gform_emma_field_value', function ( $value, $form, $entry, $field_id ) {    $field = GFAPI::get_field( $form, $field_id );     if ( is_object( $field ) && $field->get_input_type() === 'checkbox' ) {        $value = explode( ', ', $value );    }     return $value;}, 10, 4 );
4. Help Scout – Change Value of Specific Field
This example shows how you can change the value of field 3 on form 10 before it is passed to Help Scout.
1234add_filter( 'gform_helpscout_field_value_10_3', function ( $value, $form, $entry, $field_id ) {     return 'your new value';}, 10, 4 );
5. Zoho CRM – Format Date Field
This example shows how you can reformat the entry date from yyyy-mm-dd to the format configured on the field.
123456789add_filter( 'gform_zohocrm_field_value', function ( $value, $form, $entry, $field_id ) {    $field = GFAPI::get_field( $form, $field_id );     if ( is_object( $field ) && $field->type == 'date' ) {        $value = GFCommon::date_display( $value, $field->dateFormat );    }     return $value;}, 10, 4 );
6. Zoho CRM – Format Checkbox Field
This example shows how you can reformat the checkbox field value to pass true or false instead of the choice. This snippet is not needed if you』re using version 1.8 of the add-on or newer.
1234567891011add_filter( 'gform_zohocrm_field_value', function ( $value, $form, $entry, $field_id ) {    gf_zohocrm()->log_debug( __METHOD__ . '(): Running...' );    $field = GFAPI::get_field( $form, $field_id );     if ( is_object( $field ) && $field->get_input_type() === 'checkbox' ) {        gf_zohocrm()->log_debug( __METHOD__ . '(): Checkbox value to true or false.' );        $value = $value ? 'true' : 'false';    }     return $value;}, 10, 4 );
Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Gravity Forms 1.9.10.11.
Source Code
1234gf_apply_filters( "gform_{$slug}_field_value", array(    $form['id'],    $field_id), $field_value, $form, $entry, $field_id );
This filter is located in GFAddOn::maybe_override_field_value() in includes/addon/class-gf-addon.php.

gform_after_update_entry

gform_after_update_entry

DescriptionUsageParametersExamples1. Update entry properties.2. Log the entry before and after update.3. Trigger Zapier Feed4. Trigger Mailchimp Feed5. Trigger Webhooks Feed6. Add notePlacementSource Code

Description
This hook fires after the entry has been updated via the entry detail page.
Usage
The following would run for any form:
1add_action( 'gform_after_update_entry', 'your_function_name', 10, 2 );
To target a specific form append the form id to the hook name. (format: gform_after_update_entry_FORMID)
1add_action( 'gform_after_update_entry_10', 'your_function_name', 10, 2 );

Parameters

$form Form Object
The form object for the entry.

$entry_id integer
The entry ID.

$original_entry Entry Object
The entry before being updated. Since 1.9.12.9.

Examples
1. Update entry properties.
This example sets the entry as unread and stars it.
12345add_action( 'gform_after_update_entry', 'update_entry', 10, 2 );function update_entry( $form, $entry_id ) {    GFAPI::update_entry_property( $entry_id, 'is_read', 0 );    GFAPI::update_entry_property( $entry_id, 'is_starred', 1 );}
2. Log the entry before and after update.
123456add_action( 'gform_after_update_entry', 'log_post_update_entry', 10, 3 );function log_post_update_entry( $form, $entry_id, $original_entry ) {    $entry = GFAPI::get_entry( $entry_id );    GFCommon::log_debug( 'gform_after_update_entry: original_entry => ' . print_r( $original_entry, 1 ) );    GFCommon::log_debug( 'gform_after_update_entry: updated entry => ' . print_r( $entry, 1 ) );}
3. Trigger Zapier Feed
This example shows how you can send the updated entry to Zapier.
123456789add_action( 'gform_after_update_entry', 'send_to_zapier_on_update', 10, 2 );function send_to_zapier_on_update( $form, $entry_id ) {    $entry = GFAPI::get_entry( $entry_id );    if ( class_exists( 'GFZapier' ) ) {        GFZapier::send_form_data_to_zapier( $entry, $form );    } elseif ( function_exists( 'gf_zapier' ) ) {        gf_zapier()->maybe_process_feed( $entry, $form );    }}
4. Trigger Mailchimp Feed
This example shows how you can send the updated entry to Mailchimp.
1234567add_action( 'gform_after_update_entry', 'send_to_mailchimp_on_update', 10, 2 );function send_to_mailchimp_on_update( $form, $entry_id ) {    if ( function_exists( 'gf_mailchimp' ) ) {        $entry = GFAPI::get_entry( $entry_id );        gf_mailchimp()->maybe_process_feed( $entry, $form );    }}
You can use this same snippet for other similar add-ons like Zoho CRM, AgileCRM, ActiveCampaign, etc… Replacing gf_mailchimp above by the corresponding add-on function name, like gf_zohocrm, gf_agilecrm, gf_activecampaign, etc…
5. Trigger Webhooks Feed
This example shows how you can trigger processing of Webhooks feeds which use the background (async) processing feature.
1234567add_action( 'gform_after_update_entry', function ( $form, $entry_id ) {    if ( function_exists( 'gf_webhooks' ) ) {        $entry = GFAPI::get_entry( $entry_id );        gf_webhooks()->maybe_process_feed( $entry, $form );        gf_feed_processor()->save()->dispatch();    }}, 10, 2 );
6. Add note
This example shows how you can add a note to the entry.
1234add_action( 'gform_after_update_entry', function ( $form, $entry_id ) {    $current_user = wp_get_current_user();    RGFormsModel::add_note( $entry_id, $current_user->ID, $current_user->display_name, 'the note to be added' );}, 10, 2 );
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFEntryDetail::lead_detail_page() in entry_detail.php.

gform_after_submission

gform_after_submission

DescriptionUsageParametersExamples1. Update post after its creation2. Perform a custom action after creating posts with the Advanced Post Creation add-on3. Send entry data to third-party4. Access the entry by looping through the form fields5. Create a ticket in WSDesk6. Submit entries to Tripleseat7. Submit entries to SharpSpring8. Create an Events Calendar plugin event9. Check entry spam statusPlacementSource Code

Description

The gform_after_submission action hook is executed at the end of the submission process (after form validation, notification, and entry creation). Use this hook to perform actions after the entry has been created (i.e. feed data to third party applications).

The Entry Object is available to this hook and contains all submitted values.

This hook also runs for entries which are marked as spam. It does not run for submissions which fail the honeypot validation.

Usage

Applies to all forms.

add_action( 'gform_after_submission', 'after_submission', 10, 2 );

Applies to a specific form. In this case, form id 5.

add_action( 'gform_after_submission_5', 'after_submission', 10, 2 );

Parameters

$entry Entry Object The entry that was just created.$form Form Object The current form.

Examples

1. Update post after its creation

This example uses the gform_after_submission hook to change the post content, adding values from submitted fields, including an image field, to the post created as result of the form submission.

add_action( 'gform_after_submission', 'set_post_content', 10, 2 );
function set_post_content( $entry, $form ) {

//getting post
$post = get_post( $entry['post_id'] );

//changing post content
$post->post_content = 'Blender Version:' . rgar( $entry, '7' ) . "

" . rgar( $entry, '13' ) . "
";

//updating post
wp_update_post( $post );
}

2. Perform a custom action after creating posts with the Advanced Post Creation add-on

This example shows how to get the post ids when using the Advanced Post Creation Add-On.

add_action( 'gform_after_submission', 'custom_action_after_apc', 10, 2 );
function custom_action_after_apc( $entry, $form ) {

//if the Advanced Post Creation add-on is used, more than one post may be created for a form submission
//the post ids are stored as an array in the entry meta
$created_posts = gform_get_meta( $entry['id'], 'gravityformsadvancedpostcreation_post_id' );
foreach ( $created_posts as $post )
{
$post_id = $post['post_id'];
// Do your stuff here.
}
}

3. Send entry data to third-party

This example demonstrates a simple approach to posting submitted entry data to a third party application.

Note: The Webhooks Add-On can be used to perform requests like this with little or no coding required. See the Triggering Webhooks On Form Submissions article.

add_action( 'gform_after_submission', 'post_to_third_party', 10, 2 );
function post_to_third_party( $entry, $form ) {

$endpoint_url = 'https://thirdparty.com';
$body = array(
'first_name' => rgar( $entry, '1.3' ),
'last_name' => rgar( $entry, '1.6' ),
'message' => rgar( $entry, '3' ),
);
GFCommon::log_debug( 'gform_after_submission: body => ' . print_r( $body, true ) );

$response = wp_remote_post( $endpoint_url, array( 'body' => $body ) );
GFCommon::log_debug( 'gform_after_submission: response => ' . print_r( $response, true ) );
}

4. Access the entry by looping through the form fields

This example demonstrates a simple approach to accessing the field values in the entry when you don』t know the field ids.

add_action( 'gform_after_submission', 'access_entry_via_field', 10, 2 );
function access_entry_via_field( $entry, $form ) {
foreach ( $form['fields'] as $field ) {
$inputs = $field->get_entry_inputs();
if ( is_array( $inputs ) ) {
foreach ( $inputs as $input ) {
$value = rgar( $entry, (string) $input['id'] );
// do something with the value
}
} else {
$value = rgar( $entry, (string) $field->id );
// do something with the value
}
}
}

5. Create a ticket in WSDesk

See the How to use WSDesk create ticket API with third-party forms and plugins? article for an example showing how to use the gform_after_submission hook to create WSDesk tickets.

See the Creating Tickets in WSDesk using the Webhooks Add-On article if you would prefer not to use custom code.

6. Submit entries to Tripleseat

See the Using the API Lead Form with Gravity Forms in WordPress article by Tripleseat for an example showing how to use the gform_after_submission hook.

7. Submit entries to SharpSpring

See the Integrating Gravity Forms article by SharpSpring for an example showing how to use the gform_after_submission hook, they also have a tool for generating the code snippet for your form.

8. Create an Events Calendar plugin event

This example demonstrates how the gform_after_submission hook and the tribe_create_event function can be used to create an event in the Events Calendar plugin.

add_action( 'gform_after_submission', function ( $entry ) {
if ( ! function_exists( 'tribe_create_event' ) ) {
return;
}

$start_date = rgar( $entry, '4' );
$start_time = rgar( $entry, '5' );
$end_date = rgar( $entry, '6' );
$end_time = rgar( $entry, '7' );

$args = array(
'post_title' => rgar( $entry, '1' ),
'post_content' => rgar( $entry, '2' ),
'EventAllDay' => (bool) rgar( $entry, '3.1' ),
'EventHideFromUpcoming' => (bool) rgar( $entry, '3.2' ),
'EventShowInCalendar' => (bool) rgar( $entry, '3.3' ),
'feature_event' => (bool) rgar( $entry, '3.4' ),
'EventStartDate' => $start_date,
'EventStartTime' => $start_time ? Tribe__Date_Utils::reformat( $start_time, 'H:i:s' ) : null,
'EventEndDate' => $end_date,
'EventEndTime' => $end_time ? Tribe__Date_Utils::reformat( $end_time, 'H:i:s' ) : null,
);

GFCommon::log_debug( 'gform_after_submission: tribe_create_event args => ' . print_r( $args, 1 ) );
$event_id = tribe_create_event( $args );
GFCommon::log_debug( 'gform_after_submission: tribe_create_event result => ' . var_export( $event_id, 1 ) );
} );

9. Check entry spam status

This example shows how you can check if the entry has been marked as spam and prevent the rest of your function from running.

add_action( 'gform_after_submission', 'action_gform_after_submission_spam_check', 10, 2 );
function action_gform_after_submission_spam_check( $entry, $form ) {
if ( rgar( $entry, 'status' ) === 'spam' ) {
return;
}

// The code that you want to run for submissions which aren't spam.
}

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

This action hook is located in GFFormDisplay::process_form() in form_display.php.

gform_after_save_form

gform_after_save_form

DescriptionUsageParametersExamples1. Log form creation/update2. Add default fields on form creation3. Set default notification propertiesSource Code

Description
Use this action hook to perform actions right after a form is created or updated.
Usage
1add_action( 'gform_after_save_form', 'log_form_save', 10, 2 );

Parameters

$form Form Object
Current form.

$is_new bool
True if this is a new form being created. False if this is an existing form being updated.

Examples
1. Log form creation/update
This example adds a log file entry when a form is updated or created.
123456789101112add_action( 'gform_after_save_form', 'log_form_saved', 10, 2 );function log_form_saved( $form, $is_new ) {    $log_file = ABSPATH . '/gf_saved_forms.log';    $f = fopen( $log_file, 'a' );    $user = wp_get_current_user();    if ( $is_new ) {        fwrite( $f, date( 'c' ) . " - Form created by {$user->user_login}. Form ID: {$form["id"]}. n" );    } else {        fwrite( $f, date( 'c' ) . " - Form updated by {$user->user_login}. Form ID: {$form["id"]}. n" );    }    fclose( $f );}
2. Add default fields on form creation
This example shows how you can add some default fields to the form when creating new forms.
12345678910111213141516171819202122add_action( 'gform_after_save_form', 'add_default_fields', 10, 2 );function add_default_fields( $form, $is_new ) {    if ( $is_new ) {        $form['fields'] = array(            array(                'type'         => 'hidden',                'label'        => 'First Name',                'id'           => 1,                'defaultValue' => '{user:first_name}',                'formId'       => $form['id'],            ),            array(                'type'         => 'hidden',                'label'        => 'Email',                'id'           => 2,                'defaultValue' => 'user:user_email',                'formId'       => $form['id'],            ),        );        GFAPI::update_form( $form );    }}
3. Set default notification properties
This example shows how you can set the default notification properties when creating new forms.
123456789101112add_action( 'gform_after_save_form', 'set_default_notification_to', 10, 2 );function set_default_notification_to( $form, $is_new ) {    if ( $is_new ) {        foreach ( $form['notifications'] as &$notification ) {            $notification['to'] = '[email protected]';        }         $form['is_active'] = '1';         GFAPI::update_form( $form );    }}
Source Code
This action hook is located in GFFormDetail::save_form_info() in form_detail.php.

gform_after_email

gform_after_email

DescriptionUsageParametersExamples1. Retry sending2. Add note to entryPlacementSource Code

Description
Use this hook to perform actions after a user or admin notification has been sent.
Usage
1add_action( 'gform_after_email', 'after_email', 10, 12 );

Parameters

$is_success bool
Indicates whether the wp_mail function was able to successfully process the mail request without errors.

$to string
Email address to which the message is being sent.

$subject string
Email subject.

$message string
Email body.

$headers array
Email headers.

$attachments array
Email attachment(s).

$message_format string
Email format: text or html.

$from string
From email.

$from_name string
From name.

$bcc string
Bcc email.

$reply_to string
Reply to email.

$entry Entry Object
The entry currently being processed or false if not available.

Examples
1. Retry sending
This example tries to send the email a second time if the original request was unsuccessful.
12345678910add_action( 'gform_after_email', 'after_email', 10, 7 );function after_email( $is_success, $to, $subject, $message, $headers, $attachments, $message_format ) {    if ( ! $is_success ) {        //sending mail failed, try again one more time        $try_again = wp_mail( $to, $subject, $message, $headers, $attachments );        if ( ! $try_again ) {            //still unable to send, do something...perhaps log the failure in a text file        }    }}
2. Add note to entry
This example shows how you can add a note to the entry.
1234add_action( 'gform_after_email', function( $is_success, $to, $subject, $message, $headers, $attachments, $message_format, $from, $from_name, $bcc, $reply_to, $entry ) {    $current_user = wp_get_current_user();    RGFormsModel::add_note( $entry['id'], $current_user->ID, $current_user->display_name, 'the note to be added' );}, 10, 12 );
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This action hook is located in GFCommon::send_email() in common.php.

gform_after_duplicate_form

gform_after_duplicate_form

DescriptionUsageParametersExamplesSource Code

Note: This hook has been deprecated and the hook gform_post_form_duplicated should be used instead.
Description
The 「gform_after_duplicate_form」 action in Gravity Forms is triggered after a form is duplicated, allowing further actions to be performed. The hook provides the ID of the form duplicated and the ID of the new form created.
Usage
add_action( 'gform_after_duplicate_form', 'my_function', 10, 2 );

Parameters

$form_id string
ID of the form being duplicated.

new_id string
ID of the new copy of the form.

Examples
function my_function($form_id, $new_id) {
echo 'Form ' . $form_id . ' was copied into ' . $new_id;
}
add_action( 'gform_after_duplicate_form', 'my_function', 10, 2 );

Source Code
This action hook is located in forms_model.php.

gform_after_delete_form

gform_after_delete_form

DescriptionUsageParametersExamplesSource Code

Description
Use this action hook to perform actions right after a form is deleted.
Usage
1add_action( 'gform_after_delete_form', 'do_cleanup' );

Parameters

$form_id integer
ID of current form.

Examples
This example adds a log file entry when a form is deleted.
12345678add_action( 'gform_after_delete_form', 'log_form_deleted' );function log_form_deleted( $form_id ) {    $log_file = ABSPATH . '/gf_deleted_forms.log';    $f = fopen( $log_file, 'a' );    $user = wp_get_current_user();    fwrite( $f, date( 'c' ) . " - Form deleted by {$user->user_login}. Form ID: {$form_id}. n" );    fclose( $f );}
Source Code
This action hook is located in GFFormsModel::delete_form() in form_model.php.

gform_after_delete_field

gform_after_delete_field

DescriptionUsageParametersExamplesSource Code

Description
Use this action hook to perform actions right after a field is deleted from a form.
Usage
add_action( 'gform_after_delete_field', 'do_cleanup', 10, 2 );

Parameters

$form_id integer
ID of current form.

$field_id integer
ID of deleted field.

Examples
This example adds a log file entry when a field is deleted.
add_action( 'gform_after_delete_field', 'log_deleted_field', 10, 2 );
function log_deleted_field( $form_id, $field_id ) {
$log_file = ABSPATH . '/gf_deleted_fields.log';
$f = fopen( $log_file, 'a' );
$user = wp_get_current_user();
fwrite( $f, date( 'c' ) . " - Field deleted by {$user->user_login}. Form ID: {$form_id}. Field ID: {$field_id} n" );
fclose( $f );
}

Source Code
This action hook is located in GFFormsModel::delete_field() in form_model.php.

gform_after_create_post

gform_after_create_post

DescriptionUsageParametersExamples1. Update the post2. Convert date to the format expected by an ACF datepicker field type3. Update a post custom field with serialized GF checkboxesPlacementSource CodeSince

Description
This action hook is executed after the post has been created. It only applies to forms that have Post Fields.
Usage
The following would apply to all forms.
add_action( 'gform_after_create_post', 'your_function_name' );

To limit the scope of your function to a specific form, append the form id to the end of the hook name. (format: gform_after_create_post_FORMID)
add_action( 'gform_after_create_post_6', 'your_function_name' );

Parameters

$post_id integer
The ID of the post which was created from the form submission.

$entry Entry Object
The entry currently being processed. Available from 1.9.13.

$form Form Object
The form currently being processed. Available from 1.9.13.

Examples
1. Update the post
This example shows how you can update the post content, adding values from submitted fields, including an image field.
add_action( 'gform_after_create_post', 'set_post_content', 10, 3 );
function set_post_content( $post_id, $entry, $form ) {

//getting post
$post = get_post( $post_id );

//changing post content
$post->post_content = 'Blender Version:' . rgar( $entry, '7' ) . "

" . rgar( $entry, '13' ) . "
";

//updating post
wp_update_post( $post );
}

2. Convert date to the format expected by an ACF datepicker field type
The example below would take the date saved for a Gravity Forms field with id 30, convert it to the format expected by the ACF datepicker field type, and save it to the custom field meta key acf_date
Make sure to update the field id, the custom field meta key, and the form id number to make it work. Please read the snippet comments.
// Change 12 below to your form id number.
add_action( 'gform_after_create_post_12', 'gf_date_to_acf', 10, 3 );
function gf_date_to_acf( $post_id, $entry, $form ) {
GFCommon::log_debug( __METHOD__ . '(): running.' );
// Date as saved by GF. Change 30 to your date field id number.
$gf_date = rgar( $entry, '30' );
// Date changed to format expected by ACF.
$acf_date = date( 'Ymd', strtotime( $gf_date ) );
GFCommon::log_debug( __METHOD__ . '(): Date for ACF: ' . $acf_date );
// Save converted date to the acf_date meta key. Change it to your custom field meta key.
update_post_meta( $post_id, 'acf_date', $acf_date );
}

3. Update a post custom field with serialized GF checkboxes
This is useful for plugins like Advanced Custom Fields (ACF), Types and Pods where the values of the selections are stored in a serialized array. The scope of this example is limited to form id 1 and field id 18, you need to update these values to apply to your own form and field.
// Change 1 in gform_after_create_post_1 to your form id number.
add_filter( 'gform_after_create_post_1', 'gf_post_acf_checkboxes', 10, 3 );
function gf_post_acf_checkboxes( $post_id, $entry, $form ) {

// Checkboxes field id. Change this value to your field id number.
$field_id = 18;

// Get field object.
$field = GFAPI::get_field( $form, $field_id );

if ( $field->type == 'checkbox' ) {
// Get a comma separated list of checkboxes checked
$checked = $field->get_value_export( $entry );

// Convert to array.
$values = explode( ', ', $checked );
}

// Replace my_custom_field_key with your custom field meta key.
update_post_meta( $post_id, 'my_custom_field_key', $value );
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
gf_do_action( 'gform_after_create_post', $form['id'], $post_id, $lead, $form )
This hook is located in GFFormsModel::create_post() in forms_model.php.
Since
The form specific version of this hook was added in Gravity Forms 1.9.13.

gform_after_check_update

gform_after_check_update

DescriptionUsageParametersExamplesSource Code

Description
Runs a function after Gravity Forms has checked for an update.
Usage
add_action( 'gform_after_check_update', 'my_function', 10, 0 );

Parameters
There are not any parameters for this action.

Examples
function my_function() {
echo 'Update was checked';
}
add_action( 'gform_after_check_update', 'my_function', 10, 0 );

Source Code
This action hook is located in update.php.