The gform_{$SHORT_SLUG}_field_value Gravity Forms PHP function/filter/action allows you to modify a field value before it’s sent to a third-party add-on. Replace the {$SHORT_SLUG} placeholder with the short slug of the add-on you want to target.
Usage
add_filter('gform_{$SHORT_SLUG}_field_value', 'your_function_name', 10, 4);
Replace the {$SHORT_SLUG} placeholder with the short slug of the add-on you want to target.
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.
More information
See Gravity Forms Docs: gform_{$SHORT_SLUG}_field_value
Examples
Replace choice value with choice text for ActiveCampaign
add_filter('gform_activecampaign_field_value', 'gf_get_choice_text', 10, 4); function gf_get_choice_text($value, $form, $entry, $field_id) { // your custom code here return $value; }
Replace commas with pipes for ActiveCampaign
add_filter('gform_activecampaign_field_value', 'gf_replace_commas_with_pipes', 10, 4); function gf_replace_commas_with_pipes($value, $form, $entry, $field_id) { // your custom code here return $value; }
Reformat checkbox field value to be passed as an array for Emma
add_filter('gform_emma_field_value', 'gf_format_checkbox_field', 10, 4); function gf_format_checkbox_field($value, $form, $entry, $field_id) { // your custom code here return $value; }
Change the value of a specific field for Help Scout
add_filter('gform_helpscout_field_value_10_3', 'gf_change_specific_field_value', 10, 4); function gf_change_specific_field_value($value, $form, $entry, $field_id) { // your custom code here return $value; }
Reformat date field value for Zoho CRM
add_filter('gform_zohocrm_field_value', 'gf_format_date_field', 10, 4); function gf_format_date_field($value, $form, $entry, $field_id) { // your custom code here return $value; }