The gform_entries_column_filter is a Gravity Forms PHP filter used to modify the value of any non-first column in the entry list grid.
Usage
add_filter('gform_entries_column_filter', 'change_column_data', 10, 5);
Parameters
- $value (string): The current value that will be displayed in this cell.
- $form_id (integer): ID of the current form.
- $field_id (integer): ID of the field that this column applies to.
- $entry (Entry Object): Current entry object.
- $query_string (string): Current page query string with search and pagination state.
More information
See Gravity Forms Docs: gform_entries_column_filter
Examples
Replace the value for a specific field and form
This example replaces the value when the field id is 2 and the form id is 1. Note that this filter does not fire for the first column in the grid. For the first column, use gform_entries_first_column.
add_filter('gform_entries_column_filter', 'change_column_data', 10, 5); function change_column_data($value, $form_id, $field_id, $entry, $query_string) { if ($form_id != 1 || $field_id != 2) { return $value; } return "newdata"; }
Display text next to the existing value
This example displays text next to the existing value when the field id is 2 and the form id is 1.
add_filter('gform_entries_column_filter', 'change_column_data', 10, 5); function change_column_data($value, $form_id, $field_id, $entry, $query_string) { if ($form_id != 1 || $field_id != 2) { return $value; } return $value . " - newdata"; }
Placement
This code should be placed in the functions.php
file of your active theme.
Source Code
This hook is located in GFEntryList::leads_page()
in entry_list.php
.