GFSignature

GFSignature

Descriptiongf_signature()get_signature_url()UsageParametersdelete_signature()UsageParameters

Description
GFSignature is the class which houses some of the functionality included by the Gravity Forms Signature Add-on; it extends the GFAddon class which is part of the add-on framework. Below are a few functions which you may find useful when working on your own custom code.
gf_signature()
The gf_signature() function is used to return an instance of the GFSignature class.
get_signature_url()
Returns the URL for the specified signature.
Usage
$signature_url = gf_signature()->get_signature_url( $filename );

Parameters

$filename string
The filename for this signature. The filename can be found in the Entry Object as the value for the signature field.

Returns string
The url for the specified signature.

delete_signature()
Initiates deletion of the signature file and updates the entry to remove the filename.
Usage
$result = gf_signature()->delete_signature( $entry_id, $field_id );

Parameters

$entry_id integer
The ID of the entry to be updated.

$field_id integer
The ID of the signature field.

Returns bool
Indicates if the entry field value was sucesfully updated.

GFPaymentAddOn

GFPaymentAddOn

IntroductionGetting StartedCreating Plugin Settings for Payment FeedsCreating Feed Settings Fields for Payment FeedsProducts and Services ExampleSubscriptions ExampleHelper Functions for Adding/Removing/Replacing Default FieldsModifying Default FieldsBilling Info FieldsBilling Cycle IntervalsMain Functionalityredirect_url()Parametersauthorize()ParametersReturnscapture()ParametersReturnssubscribe()ParametersReturnscancel()callback()post_callback()

Introduction
The GFPaymentAddOn class provides basic functionality for developers when creating new add-ons for Gravity Forms that collect payments. It handles payments which redirect to a third-party website (e.g., PayPal Standard) and payments which are made using a credit card with the transaction hidden behind-the-scenes (e.g., Authorize.Net, PayPal Payments Pro, and Stripe). The GFPaymentAddOn class extends the GFFeedAddOn class which gives you the functionality from that class and also the functionality from the GFAddOn class.
The GFPaymentAddOn class uses functionality similar to the GFAddOn. View the GFAddOn』s documention for Initialization, Results Page, and Uninstalling for more information on how to use this functionality in the GFPaymentAddOn class.
Getting Started
These are the first steps you』ll need to take to create an add-on using the Payment Add-On Framework:

Include the Payment Add-On Framework files by calling the following:
GFForms::include_payment_addon_framework();

Inherit the Payment Add-On Framework by creating a new class which extends GFPaymentAddOn :
class GFPayPal extends GFPaymentAddOn {}

Add the class variables to configure the add-on. The list below are variables specific to the payment framework. There are other variables needed which are documented in the GFAddOn class variables section.

$_supports_callbacks boolean
If set to true, callbacks/webhooks/IPN will be enabled and the appropriate database table will be created.

$_requires_credit_card boolean
If set to true, the user will not be able to create feeds for a form until a credit card field has been added.

$redirect_url string
For payment add-ons that send users to an external website to submit payment (i.e. PayPal Standard), use this class variable to specify the URL of the payment page.

Example:
if ( method_exists( 'GFForms', 'include_payment_addon_framework' ) ) {
GFForms::include_payment_addon_framework();
class GFPayPal extends GFPaymentAddOn {
protected $_version = "2.3.7";
protected $_min_gravityforms_version = "1.8.12";
protected $_slug = 'gravityformspaypal';
protected $_path = 'gravityformspaypal/paypal.php';
protected $_full_path = __FILE__;
protected $_title = 'Gravity Forms PayPal Standard Add-On';
protected $_short_title = 'PayPal';
protected $_supports_callbacks = true;
protected $_requires_credit_card = false;
}
}

Creating Plugin Settings for Payment Feeds
Review the article Creating Plugin Settings for more details on adding plugin settings.
Creating Feed Settings Fields for Payment Feeds
The Payment Framework automatically adds key fields to the Feed Settings page. You may add the feed_settings_fields() function to your add-on and override the base function.
The key fields automatically added are as follows:

Feed Name
Text box labeled 「Name」 so you may uniquely identify your payment feed.

Transaction Type
Drop down populated with the types 「Products and Services」 and 「Subscriptions」.

Payment Amount
This is only available when the transaction type is 「Products and Services」.
Drop down populated with the option 「Form Total」. If there are products on the form, the product fields will also be populated in the drop down. Form Total is selected by default.

Subscription Settings
These are only available when the transaction type is 「Subscription」.

Recurring Amount
Drop down populated with the option 「Form Total」. If there are products on the form, the product fields will also be populated in the drop down.
Billing Cycle
The choices available are days (1-365), weeks (1-52), months (1-12), years (1-10).
Recurring Times
The choices available are infinite or 2-100. This is the number of times the payment will occur.
Setup Fee
When enabled, a drop down appears for you to select which product field is used as the setup fee. The 「Trial」 option is not available when this is enabled.
Trial
When enabled, a drop down appears for you to select which product field is used at the Trial amount. You also have to ability to manually enter an amount instead of using a product field on the form.

Billing Information

Email
Address
Address 2
City
State
Zip
Country

Options
Displays a 「Sample Option」 checkbox for you to modify to your needs.

Conditional Logic
Displays an 「Enable Condition」 checkbox which when clicked provides the functionality for selecting a conditional logic match using 「All」 or 「Any」 with the ability to select fields on the form, a condition (is, is not, greater than, less than, contains, starts with, ends with) and an input to set the matching data.

Products and Services Example

Subscriptions Example

Helper Functions for Adding/Removing/Replacing Default Fields
There are several helper functions that you may use to remove, modify, and add fields.

add_field_before()
add_field_after()
remove_field()
replace_field()

Modifying Default Fields
The default values for some of the fields may not be appropriate for your add-on. Below are a few you may modify.
Billing Info Fields
You may override the function billing_info_fields() to set your own fields for billing.
public function billing_info_fields() {
$fields = array(
array( 'name' => 'email', 'label' => __( 'Email', 'gravityforms' ), 'required' => false ),
array( 'name' => 'zip', 'label' => __( 'Zip', 'gravityforms' ), 'required' => false ),
);
return $fields;
}

Billing Cycle Intervals
You may override the function supported_billing_intervals() to set your own intervals to be used.
public function supported_billing_intervals() {
//authorize.net does not use years or weeks, override framework function
$billing_cycles = array(
'day' => array( 'label' => __( 'day(s)', 'gravityforms' ), 'min' => 7, 'max' => 365 ),
'month' => array( 'label' => __( 'month(s)', 'gravityforms' ), 'min' => 1, 'max' => 12 )
);

return $billing_cycles;
}

Main Functionality
Like the GFAddOn class, the Payment Framework contains many features that can be activated by overriding functions in the GFPaymentAddOn class. To override a function, add a function with the same name (and arguments) as the function in the base class.
redirect_url()
Override this method to specify a URL to the third party payment processor. Useful when developing a payment gateway that processes the payment outside of the website (i.e. PayPal Standard). Returns a full URL (including http:// or https://) to the payment processor.
protected function redirect_url( $feed, $submission_data, $form, $entry ) {}

Parameters

$feed Feed Object
Active payment feed containing all the configuration data. The properties will change dependent on the add-on.

$submission_data Submission Data
Contains form field data submitted by the user as well as payment information (i.e. payment amount, setup fee, line items, etc…)

$form Form Object
Current form array containing all form settings.

$entry Entry Object
Current entry array containing entry information (i.e data submitted by users).

authorize()
Override this method to add integration code to the payment processor in order to authorize a credit card with or without capturing payment. This method is executed during the form validation process and allows the form submission process to fail with a validation error if there is anything wrong with the payment/authorization. This method is only supported by single payments. For subscriptions or recurring payments, use the subscribe() method. Returns an array of the authorization information.
protected function authorize( $feed, $submission_data, $form, $entry ) {}

Parameters

$feed Feed Object
Active payment feed containing all the configuration data. The properties will change dependent on the add-on.

$submission_data Submission Data
Contains form field data submitted by the user as well as payment information (i.e. payment amount, setup fee, line items, etc…).

$form Form Object
Current form array containing all form settings.

$entry Entry Object
Current entry array containing entry information (i.e data submitted by users). Note: the entry hasn』t been saved to the database at this point, so this $entry object does not have the 『ID』 property and is only a memory representation of the entry.

Returns
An associative array with the following properties:

is_authorized boolean

error_message string

transaction_id string

If the payment is captured in this method, returns a 『captured_payment』 array with the following information about the payment:

captured_payment array

is_success – boolean
error_message – string
transaction_id – string
amount – float

capture()
Override this method to capture a single payment that has been authorized via the authorize() method. Use only with single payments. For subscriptions, use subscribe() instead. Return an array with the information about the captured payment.
protected function capture( $authorization, $feed, $submission_data, $form, $entry ) {}

Parameters

$authorization array
Contains the result of the authorize() function.

$feed Feed Object
Active payment feed containing all the configuration data. The properties will change dependent on the add-on.

$submission_data Submission Data
Contains form field data submitted by the user as well as payment information (i.e. payment amount, setup fee, line items, etc…).

$form Form Object
Current form array containing all form settings.

$entry Entry Object
Current entry array containing entry information (i.e data submitted by users).

Returns
Returns an associative array with the information about the captured payment in the following format:

is_success boolean

error_message string

transaction_id string

amount float

payment_method string

subscribe()
Override this method to add integration code to the payment processor in order to create a subscription. This method is executed during the form validation process and allows the form submission process to fail with a validation error if there is anything wrong when creating the subscription.
protected function subscribe( $feed, $submission_data, $form, $entry ) {}

Parameters

$feed Feed Object
Active payment feed containing all the configuration data. The properties will change dependent on the add-on.

$submission_data Submission Data
Contains form field data submitted by the user as well as payment information (i.e. payment amount, setup fee, line items, etc…).

$form Form Object
Current form array containing all form settings.

$entry Entry Object
Current entry array containing entry information (i.e data submitted by users). Note: the entry hasn』t been saved to the database at this point, so this $entry object does not have the 『ID』 property and is only a memory representation of the entry.

Returns
An associative array with the following properties:

is_success boolean

error_message string

subscription_id string

amount float

To implement an initial/setup fee for gateways that do not support setup fees as part of subscriptions, manually capture the funds for the setup fee as a separate transaction and send that payment information in the following property:

captured_payment array

name – string
is_success – boolean
error_message – string
subscription_id – string
amount – float

cancel()
Override this method to add integration code to the payment processor in order to cancel a subscription. This method is executed when a subscription is canceled from the Payment Gateway (i.e. Stripe or PayPal).
protected function cancel( $entry, $feed ) {
return false;
}

callback()
Override this method to add code to handle processing the callback/webhook/IPN request.
protected function callback() {}
Return an associative array with the following properties:

id string
The event ID.

type string
The action type. Possible values: complete_payment, refund_payment, fail_payment, add_pending_payment, void_authorization, create_subscription, cancel_subscription, expire_subscription, add_subscription_payment, fail_subscription_payment, or a custom event type.

amount integer|float
The transaction amount.

transaction_type string
The type of transaction which occurred.

transaction_id string
The transaction ID.

subscription_id string
The subscription ID.

entry_id integer
The ID of the entry which created the transaction.

payment_status string
The payment status.

note string
The note to be added to the entry.

callback string
The function to be used to process the custom event type.

post_callback()
Override this method to add code to handle post processing of the callback.
protected function post_callback( $callback_action, $result ) {}

gform_zohocrm_task

gform_zohocrm_task

DescriptionUsageParametersExamplesAppend text to SubjectPlacementSource Code

Description
This filter can be used to modify the task arguments before they are sent to Zoho CRM.
Usage
The following would apply to all feeds:
add_filter( 'gform_zohocrm_task', 'your_function_name', 10, 4 );

To target feeds for a specific form append the form id to the hook name. (format: gform_zohocrm_task_FORMID)
add_filter( 'gform_zohocrm_task_4', 'your_function_name', 10, 4 );

Parameters

$task array
The task arguments are an associative array.
array(
'Due Date' => '2015-10-15',
'Subject' => 'some text',
'Status' => 'Not Started',
'SMOWNERID' => 'The-Zoho-CRM-User-ID-Here',
'CONTACTID' => 'The-Zoho-CRM-Contact-ID-Here'
'SEID' => 'The-Zoho-CRM-Lead-Or-Contact-ID-Here'
'SEMODULE' => 'Leads' /* or Contacts */
)

$feed Feed Object
The feed currently being processed.

$entry Entry Object
The entry currently being processed.

$form Form Object
The form currently being processed.

Examples
Append text to Subject
This example shows how you can append some text to the 『Subject』 argument based on a field value in the Entry Object.
add_filter( 'gform_zohocrm_task_4', 'change_task_argument', 10, 4 );
function change_task_argument( $task, $feed, $entry, $form ) {
if ( rgars( $feed, 'meta/feedName') == 'Zoho CRM Feed 2' && rgar( $entry, '5' ) == 'No' ) {
$task['Subject'] .= ' - some more text';
}

return $task;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
gf_apply_filters( 'gform_zohocrm_task', $form['id'], $task, $feed, $entry, $form )

This filter is located in GFZohoCRM::create_task() in class-gf-zohocrm.php.

gform_zohocrm_record

gform_zohocrm_record

DescriptionUsageParametersExamplePlacementSource Code

Description
This filter can be used to modify the record arguments before they are sent to Zoho CRM.
Usage
The following would apply to all feeds:
add_filter( 'gform_zohocrm_record', 'your_function_name', 10, 4 );

To target feeds for a specific form append the form id to the filter name. (format: gform_zohocrm_record_FORMID)
add_filter( 'gform_zohocrm_record_4', 'your_function_name', 10, 4 );

Parameters

$record array
The record argument.

$module string
The module.

$feed Feed Object
The feed currently being processed.

$entry Entry Object
The entry currently being processed.

$form Form Object
The form currently being processed.

Example
This example shows how you can modify the record to set the Lead Assignment Rules ID (lar_id) for an entry before it is sent to Zoho CRM. You need to update the snippet with your form id number, feed name, and value for lar_id. Please read the snippet comments.
// Change 33 to the id number of your form.
add_filter( 'gform_zohocrm_record_33', 'my_gform_zohocrm_record', 10, 5 );
function my_gform_zohocrm_record( $record, $module, $feed, $entry, $form ) {
$feed_name = rgars( $feed, 'meta/feedName' );
// Change Your Feed Name Here to the name of the Zoho CRM feed.
if ( $module === 'Leads' && $feed_name === 'Your Feed Name Here' ) {
// Change to use your own lar_id.
$record = array_merge( array( 'lar_id' => '123213' ), $record );
}
return $record;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
$filtered_record = gf_apply_filters( array( 'gform_zohocrm_record', $record['form']['id'] ), $record, $module, $record['feed'], $record['entry'], $record['form'] );

This filter is located in GF_ZohoCRM_API::insert_record() in class-gf-zohocrm-api.php.

gform_zohocrm_post_create_task

gform_zohocrm_post_create_task

DescriptionUsageParametersExampleSinceSource Code

Description
Allows custom actions to be performed after creating the task.
Usage
{
add_action( 'gform_zohocrm_post_create_task', $task_record, $task, $feed, $entry, $form );

return $task_id;

}

Parameters

$task_record array
The task record.

$task array
The task arguments.

$feed array
The feed object.

$entry array
The entry object.

$form array
The form object.

Example
add_action( 'gform_zohocrm_post_create_task', 'action_after_task_creation', 10, 5 );
function action_after_task_creation( $task_record, $task, $feed, $entry, $form ) {
// Do your stuff
}

Since
This filter was added in Zoho CRM version 1.8.
Source Code
This filter is located in class-gf-zohocrm.php.

gform_zohocrm_post_create_lead

gform_zohocrm_post_create_lead

DescriptionUsageParametersExampleSinceSource Code

Description
Allows custom actions to be performed after creating a lead with a Zoho CRM feed.
Usage
add_action( 'gform_zohocrm_post_create_lead', 'action_after_lead_creation', 10, 5 );
function action_after_lead_creation( $lead_record, $lead, $feed, $entry, $form ) {
// Do your stuff
}

Parameters

$lead_record array

The response from Zoho CRM after a feed has successfully created a lead, with the lead id injected.
Sample array:
array
(
'code' => 'SUCCESS'
'duplicate_field' => ''
'action' => 'insert'
'details' => array
(
'Modified_Time' => '2019-08-08T12:15:47-07:00' //System-generated modification timestamp
'Modified_By' => array // Name and ID of the user who modified the lead.
(
'name' => 'Silvia Samples'
'id' => 3451042000000292017
)

'Created_Time' => '2019-08-08T12:15:47-07:00' // System-generated creation timestamp.
'id' => 3351042000000745001 // Unique ID of the lead
'Created_By' => array // Name and ID of the user who created the lead.
(
'name' => 'Silvia Samples'
'id' => 3451042000000292017
)

)

'message' => 'record added'
'status' => 'success'
)

$lead array
The lead arguments that you sent to Zoho CRM to initiate the creation process. It includes entry fields as per your Zoho feed field mappings, and the feed options you have set.

A sample array may be:
array
(
'Email_Opt_Out' => '' //feed setting
'Description' => '' //Lead description, as per Zoho definitions.
'Lead_Source' => 'Partner' //Source from which the lead was created, as per Zoho definitions.
'Lead_Status' => 'Rating' => 'Contact in Future' //Status of the lead, as per Zoho definitions.
'Rating' => 'Contact in Future' //The rating of the lead, as per Zoho definitions.

'options' => 'array
(
'duplicateCheck' => 1 //value of 1 or 2. See note below.
'isApproval' => '' //the Approval Mode from the feed settings
'wfTrigger' => '' //the Workflow Mode from the feed settings
)

// Fields that have been mapped in the Zoho feed, and their values collected from the entry.
'Company' => 'Sample Company'
'Email' => '[email protected]'
'First_Name' => 'Silvia'
'Last_Name' => 'Samples'
)

Note regarding duplicateCheck:
duplicateCheck value of 1 is equivalent to the feed options of Update Contact If Already Exists = false, and Allow Duplicate = false. That is, feed will only create contact if it does not exist already.
duplicateCheck value of 2 is equivalent to the feed options of Update Contact If Already Exists = true, and Allow Duplicate = false. That is, feed will update a matching contact if it exists already.

$feed array
The feed object.

$entry array
The entry object.

$form array
The form object.

Example
The following example will send a notification after the lead creation. The notification must be configured to use a custom notification event already registered using gform_notification_events filter.
add_action( 'gform_zohocrm_post_create_lead', 'send_notification_after_lead', 10, 5 );
function send_notification_after_lead( $lead_record, $lead, $feed, $entry, $form ) {
// Send a notification configured to use the custom Event zoho_lead
GFAPI::send_notifications( $form, $entry, 'zoho_lead' );
}

Since
This filter was added in Zoho CRM version 1.8.
Source Code
This filter is located in class-gf-zohocrm.php.

gform_zohocrm_post_create_contact

gform_zohocrm_post_create_contact

DescriptionUsageParametersExamplePlacementSinceSource Code

Description
Allows custom actions to be performed after creating the contact.
Usage
add_action( 'gform_zohocrm_post_create_contact', $contact_record, $contact, $feed, $entry, $form );

return $contact_id;

}

Parameters

$contact_record array
The contact record.

$contact array
The contact arguments.

$feed array
The feed object.

$entry array
The entry object.

$form array
The form object.

Example
add_action( 'gform_zohocrm_post_create_contact', 'action_after_contact_creation', 10, 5 );
function action_after_contact_creation( $contact_record, $contact, $feed, $entry, $form ) {
// Do your stuff
}

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.8.
Source Code
This filter is located in class-gf-zohocrm.php.

gform_zohocrm_lead

gform_zohocrm_lead

DescriptionUsageParametersExamples1. Change Email Opt Out2. Set Owner based on country3. Set the Layout4. Preserve Lead Source on UpdatePlacementSource Code

Description
This filter can be used to modify the lead arguments before they are sent to Zoho CRM.
Usage
The following would apply to all feeds:
add_filter( 'gform_zohocrm_lead', 'your_function_name', 10, 4 );

To target feeds for a specific form append the form id to the hook name. (format: gform_zohocrm_lead_FORMID)
add_filter( 'gform_zohocrm_lead_4', 'your_function_name', 10, 4 );

Parameters

$lead array
The lead arguments are an associative array.
array(
'Email Opt Out' => 'false',
'Description' => 'some text',
'Lead Source' => 'Advertisement',
'Lead Status' => 'Not Contacted',
'Rating' => 'Acquired',
'SMOWNERID' => 'The-Zoho-CRM-User-ID-Here',
'options' => array(
'duplicateCheck' => '1',
'isApproval' => 'false',
'wfTrigger' => 'false'
),
)

$feed Feed Object
The feed currently being processed.

$entry Entry Object
The entry currently being processed.

$form Form Object
The form currently being processed.

Examples
1. Change Email Opt Out
This example shows how you can change the 『Email Opt Out』 setting based on a field value in the Entry Object.
add_filter( 'gform_zohocrm_lead_4', 'change_lead_argument', 10, 4 );
function change_lead_argument( $lead, $feed, $entry, $form ) {
if ( rgars( $feed, 'meta/feedName') == 'Zoho CRM Feed 2' && rgar( $entry, '5' ) == 'No' ) {
$lead['Email Opt Out'] = 'true';
}

return $lead;
}

2. Set Owner based on country
add_filter( 'gform_zohocrm_lead_9', 'change_lead_argument', 10, 4 );
function change_lead_argument( $lead, $feed, $entry, $form ) {
if ( rgars( $feed, 'meta/feedName' ) == 'Zoho Sales Inquiry' ) {

// get the selected country from field 4
$country = rgar( $entry, '4' );

// define an array containing the countries and the zoho crm id to be used for that country
$owners = array(
'Afghanistan' => 'The-Zoho-CRM-User-ID-Here',
'Albania' => 'The-Zoho-CRM-User-ID-Here',
);

// replace the feed configured owner with the id by using the $country as the key to the value in the $owners array
$lead['SMOWNERID'] = rgar( $owners, $country );
}

return $lead;
}

3. Set the Layout
This example shows how you can define the Layout the lead should use for a specific feed of form 4.
add_filter( 'gform_zohocrm_lead_4', function( $lead, $feed, $entry, $form ) {
if ( rgars( $feed, 'meta/feedName') == 'Zoho CRM Feed 2' ) {
$lead['Layout'] = array( 'name' => 'the layout name here', 'id' => 'the layout id here' );
}

return $lead;
}, 10, 4 );

4. Preserve Lead Source on Update
This example shows how you can preserve any existing Lead Source in Zoho for all feeds on form 33.
add_filter( 'gform_zohocrm_lead_33', function( $lead, $feed, $entry, $form ) {
unset( $lead['Lead_Source'] );

return $lead;
}, 10, 4 );

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
gf_apply_filters( 'gform_zohocrm_lead', $form['id'], $lead, $feed, $entry, $form )

This filter is located in GFZohoCRM::create_lead() in class-gf-zohocrm.php.

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_zohocrm_contact

gform_zohocrm_contact

DescriptionUsageParametersExamplesChange Email Opt OutPlacementSource Code

Description
This filter can be used to modify the contact arguments before they are sent to Zoho CRM.
Usage
The following would apply to all feeds:
1add_filter( 'gform_zohocrm_contact', 'your_function_name', 10, 4 );
To target feeds for a specific form append the form id to the hook name. (format: gform_zohocrm_contact_FORMID)
1add_filter( 'gform_zohocrm_contact_4', 'your_function_name', 10, 4 );
Parameters

$contact array
The contact arguments are an associative array.
1234567891011array(    'Email Opt Out' => 'false',    'Description'   => 'some text',    'Lead Source'   => 'Advertisement',    'SMOWNERID'     => 'The-Zoho-CRM-User-ID-Here',    'options'       => array(        'duplicateCheck' => '1',        'isApproval'     => 'false',        'wfTrigger'      => 'false'    ),)

$feed Feed Object
The feed currently being processed.

$entry Entry Object
The entry currently being processed.

$form Form Object
The form currently being processed.

Examples
Change Email Opt Out
This example shows how you can change the 『Email Opt Out』 setting based on a field value in the Entry Object.
12345678add_filter( 'gform_zohocrm_contact_4', 'change_contact_argument', 10, 4 );function change_contact_argument( $contact, $feed, $entry, $form ) {    if ( rgars( $feed, 'meta/feedName') == 'Zoho CRM Feed 2' && rgar( $entry, '5' ) == 'No' ) {        $contact['Email Opt Out'] = 'true';    }     return $contact;}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
1gf_apply_filters( 'gform_zohocrm_contact', $form['id'], $contact, $feed, $entry, $form )
This filter is located in GFZohoCRM::create_contact() in class-gf-zohocrm.php.