The gform_helpscout_process_note_shortcodes filter in the Help Scout Add-On for Gravity Forms indicates whether shortcodes should be processed in the notes.
Usage
A generic example to apply for all forms:
add_filter('gform_helpscout_process_note_shortcodes', 'your_function_name', 10, 3);
To target a specific form, append the form id to the hook name (format: gform_helpscout_process_note_shortcodes_FORMID):
add_filter('gform_helpscout_process_note_shortcodes_1', 'your_function_name', 10, 3);
Parameters
$process_shortcodes (bool): Indicates if notes should be processed for shortcodes.$form (Form Object): The form object.$feed (Feed Object): The feed object.
More information
See Gravity Forms Docs: gform_helpscout_process_note_shortcodes
Examples
Disable shortcodes processing for all forms
Disable processing of shortcodes in notes for all forms using the Help Scout Add-On:
add_filter('gform_helpscout_process_note_shortcodes', 'disable_shortcode_processing', 10, 3);
function disable_shortcode_processing($process_shortcodes, $form, $feed) {
return false;
}
Enable shortcodes processing for a specific form
Enable processing of shortcodes in notes for form with ID 1:
add_filter('gform_helpscout_process_note_shortcodes_1', 'enable_shortcode_processing', 10, 3);
function enable_shortcode_processing($process_shortcodes, $form, $feed) {
return true;
}
Enable shortcodes processing based on form title
Enable shortcodes processing in notes if the form title contains the word “Support”:
add_filter('gform_helpscout_process_note_shortcodes', 'process_shortcodes_for_support_forms', 10, 3);
function process_shortcodes_for_support_forms($process_shortcodes, $form, $feed) {
if (strpos($form['title'], 'Support') !== false) {
return true;
}
return $process_shortcodes;
}
Disable shortcodes processing for a specific feed
Disable shortcodes processing in notes for a specific feed with ID 5:
add_filter('gform_helpscout_process_note_shortcodes', 'disable_shortcode_processing_for_feed', 10, 3);
function disable_shortcode_processing_for_feed($process_shortcodes, $form, $feed) {
if ($feed['id'] == 5) {
return false;
}
return $process_shortcodes;
}
Conditionally enable shortcodes processing based on form field value
Enable shortcodes processing in notes if a form field with ID 10 has a value of “Enable”:
add_filter('gform_helpscout_process_note_shortcodes', 'conditionally_process_shortcodes', 10, 3);
function conditionally_process_shortcodes($process_shortcodes, $form, $feed) {
$field_value = rgpost('input_10');
if ($field_value == 'Enable') {
return true;
}
return $process_shortcodes;
}