gform_display_field_select_columns_entry_list

Description

Allows fields to be added or removed from the select columns UI on the entry list.

Usage

The following would apply to all forms:

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. (format: gform_display_field_select_columns_entry_list_FORMID)

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. (format: gform_display_field_select_columns_entry_list_FORMID_FIELDID)

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

Parameters

  • $display bool

    Indicates whether the field will be available for selection.

  • $field Field Object

    The current field.

  • $form Form Object

    The current form.

Examples

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;

}

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Gravity Forms 2.4.

Source Code

This filter is located in GFSelectColumns::select_columns_page() in gravityforms/select_columns.php.