gform_entries_first_column_actions

gform_entries_first_column_actions

DescriptionUsageParametersExamples1. Print Entry Action2. Mark As PaidSource Code

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( '| Print', $url );

}

2. Mark As Paid
add_action( 'gform_entries_first_column_actions', function ( $form_id, $field_id, $value, $entry ) {
echo "|

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注