Using Gravity Forms ‘gform_entries_first_column’ PHP action

The gform_entries_first_column action hook allows you to add custom content to the first column of the entry list in Gravity Forms.

Usage

add_action('gform_entries_first_column', 'first_column_content', 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

Examples

Add static text to the first column

This example demonstrates how to add the static content “Sample Text” to the entry list’s first column.

add_action('gform_entries_first_column', 'first_column_content', 10, 5);

function first_column_content($form_id, $field_id, $value, $entry, $query_string) {
    echo 'Sample Text';
}

In this example, we’ll add a custom link to the first column of the entry list.

add_action('gform_entries_first_column', 'add_custom_link', 10, 5);

function add_custom_link($form_id, $field_id, $value, $entry, $query_string) {
    echo '<a href="https://example.com/?entry_id=' . $entry['id'] . '">View Details</a>';
}

Display entry submission date in the first column

This example shows how to display the entry submission date in the first column of the entry list.

add_action('gform_entries_first_column', 'display_submission_date', 10, 5);

function display_submission_date($form_id, $field_id, $value, $entry, $query_string) {
    echo 'Submitted on: ' . $entry['date_created'];
}

Show entry status in the first column

In this example, we’ll show the entry status (such as “Active” or “Inactive”) in the first column of the entry list.

add_action('gform_entries_first_column', 'show_entry_status', 10, 5);

function show_entry_status($form_id, $field_id, $value, $entry, $query_string) {
    echo 'Status: ' . ucfirst($entry['status']);
}

This example demonstrates how to add an edit link to the first column, which takes the user to the entry edit screen.

add_action('gform_entries_first_column', 'add_edit_link', 10, 5);

function add_edit_link($form_id, $field_id, $value, $entry, $query_string) {
    $edit_url = admin_url("admin.php?page=gf_entries&view=entry&id={$form_id}&lid={$entry['id']}");
    echo '<a href="' . $edit_url . '">Edit Entry</a>';
}