The gform_entries_first_column_actions action hook allows you to add extra action links to the entry row on the entry list page in Gravity Forms.
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”.
More information
See Gravity Forms Docs: gform_entries_first_column_actions
Examples
Print Entry Action
This example adds a Print action link on the Entries list page to print the entry using the Gravity Forms’ print entry functionality.
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);
}
Mark As Paid
This example adds a Mark as Paid action link to update the payment status of an entry and refresh the page.
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 action is located in GFEntryList::leads_page() in entry_list.php.