Description
The “gform_field_groups_form_editor” filter in Gravity Forms is used to modify the field groups in the Form Editor before fields are added, allowing control over what displays.
Usage
add_filter( 'gform_field_groups_form_editor', 'your_function_name', 10, 1 );
Parameters
- $field_groups arrayThe field groups, including group name, label and fields.
Example
This example changes the label for Standard Fields to Testing.
add_filter( 'gform_field_groups_form_editor', 'change_title', 10, 1 ); function change_title( $field_groups ){ foreach ( $field_groups as &$group ){ if ( $group['name'] == 'standard_fields' ){ $group['label'] = 'Testing'; } } return $field_groups; }
Placement
Your code snippet should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFFormDetail::get_field_groups() in gravityforms/form_detail.php.