Using Gravity Forms ‘gform_display_field_select_columns_entry_list’ PHP action

The gform_display_field_select_columns_entry_list filter in Gravity Forms allows you to add or remove fields from the select columns UI on the entry list.

Usage

To apply this filter to all forms, use the following code:

add_filter( 'gform_display_field_select_columns_entry_list', 'your_function_name', 10, 3 );

To target a specific form, append the form id to the hook name:

add_filter( 'gform_display_field_select_columns_entry_list_1', 'your_function_name', 10, 3 );

To target a specific form’s field, append the form id and field id to the hook name:

add_filter( 'gform_display_field_select_columns_entry_list_1_1', 'your_function_name', 10, 3 );

Replace your_function_name with your function.
// your custom code here
Then, return the first variable.

Parameters

  • $display (bool): Indicates whether the field will be available for selection.
  • $field (Field Object): The current field.
  • $form (Form Object): The current form.

More information

See Gravity Forms Docs: gform_display_field_select_columns_entry_list
This filter was added in Gravity Forms 2.4. The source code is located in GFSelectColumns::select_columns_page() in gravityforms/select_columns.php.

Examples

Show or Hide Fields

This example hides a field by ensuring it’s not available for selection. The field with ID 4 will be hidden.

add_filter( 'gform_display_field_select_columns_entry_list', 'show_hide_fields', 10, 3 );
function show_hide_fields( $display, $field, $form ){
    if ( $field['id'] == 4 ){
        return true;
    }
    return false;
}

Place this code in the functions.php file of your active theme.

Show Field for Specific Form

This example makes a field available for selection in a specific form with ID 1.

add_filter( 'gform_display_field_select_columns_entry_list_1', 'show_field_in_form', 10, 3 );
function show_field_in_form( $display, $field, $form ){
    if ( $field['id'] == 2 ){
        return true;
    }
    return false;
}

Hide Field for Specific Form’s Field

This example hides a specific field (with ID 3) in a specific form (with ID 1).

add_filter( 'gform_display_field_select_columns_entry_list_1_3', 'hide_field_in_form', 10, 3 );
function hide_field_in_form( $display, $field, $form ){
    return false;
}

Show All Fields for a Form

This example makes all fields available for selection in a specific form with ID 1.

add_filter( 'gform_display_field_select_columns_entry_list_1', 'show_all_fields_in_form', 10, 3 );
function show_all_fields_in_form( $display, $field, $form ){
    return true;
}