Documentation

gform_field_type_title

  1. Description
  2. Usage
  3. Parameters
  4. Examples
  5. Placement
  6. Source Code


Description

When adding a new field type, use this filter to assign a title to the new type.


Usage

<?php
add_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.

<?php
add_filter("gform_field_type_title", "assign_title", 10, 2);
function assign_title($title, $field_type){
    if($field_type == "map")
        return "Map";
}
?>


Placement

This code should be placed in the functions.php file of your active theme.


Source Code

This filter is located in common.php