Description
The gform_entries_primary_column_filter
filter is used to modify the contents of the first column in the entries list table.
Usage
The filter which runs for all forms would be used like so:
add_filter( 'gform_entries_primary_column_filter', 'your_function_name', 10, 7 );
Parameters
- $column_value string
The column value to be filtered. Contains the field value wrapped in a link/a tag. - $form_id integer
The ID of the current form. - $field_id integer|string
The ID of the field or the name of an entry column (i.e. date_created). - $entry array
The Entry object. - $query_string string
The current page’s query string. - $edit_url string
The url to the entry edit page. - $value string
The value of the field.
Example
add_filter( 'gform_entries_primary_column_filter', function( $column_value, $form_id, $field_id, $entry, $query_string, $edit_url, $field_value ) {
if ( $form_id == 56 ) {
$column_value = '<a href="' . $edit_url . '">Click to view entry</a>';
}
return $column_value;
}, 10, 7 );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Since
This filter was added in Gravity Forms v2.7
Source Code
This filter is located in GF_Entry_List_Table::column_default() in entry_list.php.