Description
Allows the column headers displayed on the Form List page to be modified.
Usage
add_filter( 'gform_form_list_columns', 'your_function_name', 10, 1 );
Parameters
- $columns
An array of the columns to display.//default values array( 'cb' => '<input type="checkbox" />', 'is_active' => '', 'title' => esc_html__( 'Title', 'gravityforms' ), 'id' => esc_html__( 'ID', 'gravityforms' ), 'entry_count' => esc_html__( 'Entries', 'gravityforms' ), 'view_count' => esc_html__( 'Views', 'gravityforms' ), 'conversion' => esc_html__( 'Conversion', 'gravityforms' ), );
Examples
This example renames Title to Form Title, removes the column for the checkbox to apply actions, removes entry count, removes view count, and removes the conversion.
add_filter( 'gform_form_list_columns', 'change_columns', 10, 1 ); function change_columns( $columns ){ $columns = array( 'is_active' => '', 'id' => esc_html__( 'ID', 'gravityforms' ), 'title' => esc_html__( 'Form Title', 'gravityforms' ), ); return $columns; }
Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Gravity Forms version 2.0.
Source Code
This filter is located in GF_Form_List_Table::get_columns() in form_list.php.