gform_hubspot_custom_settings

Description

Allows custom settings to be added to the Feed Settings page for custom properties created in HubSpot of the types: Single checkbox, Multiple checkboxes, Radio select, Dropdown select. This allows the data to be collected within the form.

This filter does not allow for mapping Gravity Forms fields to the added custom settings, it is used to add additional settings like the default “Lead Status” and “Lifecycle Stage” dropdowns to the HubSpot feed settings that pull in static values you have defined in HubSpot used for organizing your contacts when they are created by requests from the HubSpot add-on.

Usage

add_filter( 'gform_hubspot_custom_settings', 'your_function_name', 10, 2 );

Parameters

  • $custom_settings string

    The HTML for the custom settings. Defaults to Lead Status and Lifecycle Stage.

  • $form Form Object

    The current form.

Example

add_filter( 'gform_hubspot_custom_settings', 'add_hubspot_property', 10, 2 );
function add_hubspot_property( $custom_settings, $form ){
	$custom_settings['gravity_forms_key_test'] = array( 'allows_blank' => true, 'tooltip' => esc_html__( '<h6>License Key</h6>Gravity Forms License Key', 'gravityformshubspot' ) );
	return $custom_settings;
}

Placement

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

Since

This filter was added in HubSpot version 1.0.

Source Code

This filter is located in GF_HubSpot::get_enumeration_properties() in class-gf-hubspot.php.