DescriptionUsageParametersExamplesPlacementSource Code
Description
When adding a new field type, use this filter to assign a title to the new type.
Usage
1add_filter( 'gform_field_type_title','assign_title', 10, 2 );
Parameters
$title string
Title to be filtered. Defaults to the field type.
$field_type string
Field type.
Examples
This example assigns a title to a new custom field type.
12345678add_filter( 'gform_field_type_title', 'assign_title', 10, 2 );function assign_title( $title, $field_type ) { if ( $field_type == 'map' ) { return 'Map'; } else { return $title; }}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFCommon::get_field_type_title() in common.php