Description
Use this action hook to add extra action links to the entry row on the entry list page.
Usage
add_action( 'gform_entries_first_column_actions', 'first_column_actions', 10, 5 );
Parameters
- $form_id integer
The ID of the form from which the entry value was submitted.
-
$field_id integer
The ID of the field from which the entry value was submitted.
-
$value string
The entry value of the field id for the current lead.
-
$entry Entry Object
The current entry.
-
$query_string string
The current page’s Query String in the format “name1=val1&name2=val2”.
Examples
1. Print Entry Action
This example demonstrates how to add Gravity Form’s print entry functionality (currently available on the Entry Detail page) as an action link on the Entries list page.
add_action( 'gform_entries_first_column_actions', 'first_column_actions', 10, 4 ); function first_column_actions( $form_id, $field_id, $value, $entry ) { $url = add_query_arg( array( 'gf_page' => 'print-entry', 'fid' => $form_id, 'lid' => $entry['id'], 'notes' => '1', ), site_url() ); printf( '| <a onclick="var url = \'%s\'; window.open( url, \'printwindow\' );" href="javascript:;">Print</a>', $url ); }
2. Mark As Paid
add_action( 'gform_entries_first_column_actions', function ( $form_id, $field_id, $value, $entry ) { echo "| <span><a href=\"javascript:UpdateLeadProperty( {$entry['id']}, 'payment_status', 'Paid' );location.reload();\">Mark as Paid</a></span>"; }, 10, 4 );
Source Code
This filter is located in GFEntryList::leads_page() in entry_list.php.