gform_hubspot_form_object_pre_save_feed

Description

Allows the HubSpot form object to be filtered before saving the feed.

Usage

The following would apply to all forms:

add_filter( 'gform_hubspot_form_object_pre_save_feed', 'your_function_name', 10, 3 );

To target a specific form, append the form id to the hook name. (format: gform_hubspot_form_object_pre_save_feed_FORMID)

add_filter( 'gform_hubspot_form_object_pre_save_feed_1', 'your_function_name', 10, 3 );

Parameters

Example

add_filter( 'gform_hubspot_form_object_pre_save_feed', 'change_hubspot_feed', 10, 3 );
function change_hubspot_feed( $hs_form, $feed_meta, $form ){
	$hs_form['submitText'] = 'Submit the Form';
	return $hs_form;
}

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::generate_hubspot_form_object() in class-gf-hubspot.php.