gform_entry_list_column_input_label_only

gform_entry_list_column_input_label_only

DescriptionUsageParametersExamplesInclude Product Field LabelPlacementSource CodeSince

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

$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 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 should be placed in the functions.php file of your active theme.
Source Code
$input_label_only = apply_filters( 'gform_entry_list_column_input_label_only', $input_label_only, $form, $field );

This filter is located in GFFormsModel::get_grid_columns() in forms_model.php.
Since
This filter was added in Gravity Forms 1.9.3.

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註