gform_zoho_api_url

gform_zoho_api_url

DescriptionUsageParametersExamplesPlacementSinceSource Code

Description
The 「gform_zoho_api_url」 filter allows the API URL to be changed. This is useful because, in addition to crm.zoho.com, Zoho CRM has a European solution that points to crm.zoho.eu.
Usage
1add_filter( 'gform_zoho_api_url', 'your_function_name', 10, 1 );

Parameters

$api_url string
Zoho CRM API URL.

Examples
1234add_filter( 'gform_zoho_api_url', 'change_zoho_api_url', 10, 1 );function change_zoho_api_url( $api_url ){    return "https://crm.zoho.eu/crm/private/";}
Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Zoho CRM version 1.2.5.
Source Code
This filter is located in GF_ZohoCRM_API::__construct() in gravityformszohocrm/class-gf-zohocrm-api.php.

gform_zoho_accounts_api_url

gform_zoho_accounts_api_url

DescriptionUsageParametersExamplesPlacementSinceSource Code

Description
The 「gform_zoho_accounts_api_url」 filter allows the Zoho CRM accounts API URL to be changed. This is useful because, in addition to crm.zoho.com, Zoho CRM has a European solution that points to crm.zoho.eu.
Usage
1add_filter( 'gform_zoho_accounts_api_url', 'your_function_name', 10, 1 );

Parameters

$accounts_api_url string
Zoho CRM accounts API URL.

Examples
1234add_filter( 'gform_zoho_accounts_api_url', 'change_zoho_accounts_api_url', 10, 1 );function change_zoho_accounts_api_url( $accounts_api_url ){    return "https://accounts.zoho.eu";}
Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Zoho CRM version 1.2.5.
Source Code
This filter is located in GFZohoCRM::get_accounts_api_url() in gravityformszohocrm/class-gf-zohocrm.php.

gform_zapier_use_stored_body

gform_zapier_use_stored_body

DescriptionUsageParametersExamplesPlacementSinceSource Code

Description
The 「gform_zapier_use_stored_body」 filter is used to determine if the already stored body should be used.
Usage
add_filter( 'gform_zapier_use_stored_body', 'your_function_name', 10, 4 );

Parameters

$use_body bool
If the current body should be used. Defaults to true.

$entry Entry Object
The current entry.

$form Form Object
The form object.

$feed Feed Object
The feed object.

Examples
add_filter( 'gform_zapier_use_stored_body', 'use_body', 10, 4 );
function use_body( $use_body, $entry, $form, $feed ){
return false;
}

Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Gravity Forms Zapier version 2.1.1.
Source Code
This filter is located in GFZapier::get_body() in zapier.php.

gform_zapier_sample_field_value

gform_zapier_sample_field_value

DescriptionUsageParametersExamplesBasic usageEmail Field ExamplePlacementSinceSource Code

Description
The gform_zapier_sample_field_value filter can be used to modify the sample field value before it is sent to Zapier.
Usage
add_filter( 'gform_zapier_sample_field_value', 'your_function_name', 10, 3 );

Parameters

$value string
The sample value to be modified.

$form_id integer
The ID of the form being processed.

$field_id string
The ID of the field being processed.

Examples
Basic usage
add_filter( 'gform_zapier_sample_field_value', 'zapier_sample_field_value', 10, 3 );
function zapier_sample_field_value( $value, $form_id, $field_id ) {

return 'the new value';
}

Email Field Example
The following example shows how you can replace the sample value used by the Email type field with your own custom sample value.
add_filter( 'gform_zapier_sample_field_value', function ( $value ) {
if ( $value === '[email protected]' ) {
$value = '[email protected]';
}

return $value;
} );

Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in version 1.9.1.
Source Code
This filter is located in GFZapier::get_body() in zapier.php.

gform_zapier_request_body

gform_zapier_request_body

DescriptionUsageParametersExamples1. Change Date format2. Send Score for Survey fieldsPlacementSinceSource Code

Description

Allows the request body sent to Zapier to be filtered.

Usage

The following would apply to all forms:

add_filter('gform_zapier_request_body', 'your_function_name', 10, 4);

To target a specific form, append the form id to the hook name.Format: gform_zapier_request_body_FORMID

add_filter('gform_zapier_request_body_1', 'your_function_name', 10, 4);

Parameters

NameTypeNote$bodyarrayAn associative array containing the request body that will be sent to Zapier.$feedFeed ObjectThe feed object currently being processed.$entryEntry ObjectThe entry object currently being processed.$formForm ObjectThe form object currently being processed.

Examples

1. Change Date format

add_filter('gform_zapier_request_body', 'change_date_format', 10, 4);
function change_date_format( $body, $feed, $entry, $form ){
$body['Entry Date'] = gmdate('Y-m-d', strtotime( $entry['date_created'] ) );
return $body;
}

2. Send Score for Survey fields

add_filter( 'gform_zapier_request_body', 'zapier_single_score_export', 10, 4 );
function zapier_single_score_export( $body, $feed, $entry, $form ) {
$survey_fields = GFAPI::get_fields_by_type( $form, array( 'survey' ) );
foreach ( $survey_fields as $field ) {
$body_key = GFZapier::get_body_key( $body, 'Survey Score: ' . $field->label );
$body[ $body_key ] = gf_survey()->get_field_score( $field, $entry );
}

return $body;
}

Placement

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

Since

This filter was added in the Gravity Forms Zapier Add-On v3.1.1.

Source Code

This filter is located in GFZapier::get_body() method in zapier.php.

gform_zapier_products

gform_zapier_products

DescriptionUsageParametersExamplesPlacementSource Code

Description
The 「gform_zapier_products」 filter allows the products array to be modified before it is sent to Zapier.
Usage
add_filter( 'gform_zapier_products', 'your_function_name', 10, 3 );

Parameters

$products array
An array of product information.

$form Form Object
The form object.

$entry Entry Object
The current entry.

Examples
add_filter( 'gform_zapier_products', 'modify_products', 10, 3 );
function modify_products( $products, $form, $entry ){
$products[] = array(
'product_id' => 'TEST01',
'product_name' => 'Test Product',
'product_quantity' => 2,
'product_price' => 5,
'product_price_with_options' => 5,
'product_subtotal' => 10,
'product_options' => 'Blue'
);
return $products;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFZapier::get_products_array() in gravityformszapier/zapier.php.

gform_zapier_feed_conditional_logic

gform_zapier_feed_conditional_logic

DescriptionUsageParametersExamplesPlacementSinceSource Code

Description
The 「gform_zapier_feed_conditional_logic」 filter allows the feed conditional logic rule to be overridden during submission, allowing multiple rules to be defined.
Usage
add_filter( 'gform_zapier_feed_conditional_logic', 'your_function_name', 10, 3 );

Parameters

$logic string

$form Form Object
The form object.

$zap object
The Zapier feed object.

Examples
add_filter( 'gform_zapier_feed_conditional_logic', 'set_logic', 10, 3 );
function set_logic( $logic, $form, $zap ){
$logic['rules'][] =
array(
'fieldId' => rgar( $zap, 'zapier_conditional_field_id' ),
'operator' => 'starts_with',
'value' => 'Test',
);
return $logic;
}

Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Zapier version 1.8.
Source Code
This filter is located in GFZapier::conditions_met() in gravityformszapier/zapier.php.

gform_zapier_actions

gform_zapier_actions

DescriptionUsageParametersExamplesPlacementSource Code

Description
The 「gform_zapier_actions」 filter allows the modification of the feed actions allowed (delete and edit).
Usage
1add_filter( 'gform_zapier_actions', 'your_function_name', 10, 1 );

Parameters

$actions array
An array for the Edit and Delete actions for a Zapier Feed (includes all the HTML for each action link).

Examples
12345678add_filter( 'gform_zapier_actions', 'change_actions', 10, 1 );function change_actions( $actions ){  $delete = $actions['delete'];  $delete = str_replace( 'Delete this item', 'Delete Feed', $delete );  $delete = str_replace( '>Delete', '>Delete Feed', $delete );  $actions['delete'] = $delete;  return $actions;}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFZapierTable::column_name() in zapier.php.

gform_zap_before_save

gform_zap_before_save

DescriptionUsageParametersExamplesPlacementSource Code

Description
The 「gform_zap_before_save」 filter allows changes to be made to the Zapier feed setup before it is saved to the database.
Usage
The following would apply to all forms:
add_filter( 'gform_zap_before_save', 'your_function_name', 10, 2 );

To target a specific form, append the form id to the hook name. (format: gform_zap_before_save_FORMID)
add_filter( 'gform_zap_before_save_1', 'your_function_name', 10, 2 );

Parameters

$zap Feed Object
The feed object.

$form Form Object
The form object.

Examples
add_filter( 'gform_zap_before_save', 'change_zap', 10, 2 );
function change_zap( $zap, $form ){
$zap['name'] = "Test Zap";
return $zap;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFZapier::zapier_edit_page() in gravityformszapier/zapier.php.

gform_webhooks_request_url

gform_webhooks_request_url

DescriptionUsageParametersExamplePlacementSource Code

Description
The 「gform_webhooks_request_url」 filter allows the webhook HTTP request url to be modified.
Usage
add_filter( 'gform_webhooks_request_url' 'your_function_name', 10, 4 );

Parameters

$request_url string
HTTP request headers.

$feed Feed Object
The feed object.

$entry Entry Object
The current entry.

$form Form Object
The form object.

Example
add_filter( 'gform_webhooks_request_url', 'set_url', 10, 4 );
function set_url( $request_url, $feed, $entry, $form ){
$request_url = 'https://www.your.domain';

return $request_url;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GF_Webhooks::process_feed() in gravityformswebhooks/class-gf-webhooks.php.