Description
Use this filter to modify or replace the GF_Field
object after it has been created.
Usage
add_filter( 'gform_gf_field_create', 'my_custom_function', 10, 2 );
Parameters
Examples
1. Create GF_Field object based on “type” property (rather than “inputType” property)
add_filter( 'gform_gf_field_create', 'my_custom_function', 10, 2 ); function my_custom_function( $field, $properties ) { if( $field->type == 'myCustomFieldType' ) { $field = new GF_My_Custom_Field_Type( $properties ); } return $field; }
Source Code
This filter is located in GF_Fields::create() in includes/addon/class-gf-fields.php.
Since
This filter was added in Gravity Forms 2.0.