Description
Use this filter to exclude field types from the merge tag drop-downs that are displayed throughout the admin pages.
Usage
add_filter( 'gform_merge_tag_list_exclude', 'exclude_hidden', 10, 3 );
Parameters
- $excluded_fields array
Array to be filtered. Contains a list of field types that will be excluded from the merge tag drop down
-
$element_id string
HTML ID attribute of the merge tag drop-down.
-
$fields array
Array containing all form Field Object
Examples
This example adds a message below the currency drop down.
add_filter( 'gform_merge_tag_list_exclude', 'currency_message', 10, 3 ); function currency_message( $message ) { return 'US Dollars is the only supported currency by this payment gateway.'; }
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFCommon::insert_variables() in common.php