Description
This filter can be used to override the default behavior of only including the input label in the entry list column header.
Usage
The base filter which would run for all forms and all fields would be used like so:
add_filter( 'gform_entry_list_column_input_label_only', 'your_function_name', 10, 3 );
Parameters
| Parameter | Type | Description |
|---|---|---|
$input_label_only | bool | Should the label only include the input label. |
$form | Form Object | The form currently being processed. |
$field | Field Object | The field currently being processed. |
Examples
Include the Product field label.
This example shows how you can also include the field label along with the choice label.
add_filter( 'gform_entry_list_column_input_label_only', function ( $input_label_only, $form, $field ) {
return $field->type == 'product' ? false : $input_label_only;
}, 10, 3 );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This filter is located in GFFormsModel::get_grid_columns() in forms_model.php.
Since
This filter was added in Gravity Forms 1.9.3.