Using Gravity Forms ‘gform_post_entry_list’ PHP action

The gform_post_entry_list action in Gravity Forms fires after the entry list content is generated. It allows you to add custom content below the entry list table.

Usage

To use this action for all forms, add the following code:

add_action('gform_post_entry_list', 'your_function_name');

Parameters

  • $form_id (integer): The ID of the form the entry list is being displayed for.

More information

See Gravity Forms Docs: gform_post_entry_list

This action was added in Gravity Forms 1.9.13.21 and is located in GFEntryList::all_leads_page() in entry_list.php.

Examples

Display custom text below entry list

This example displays custom text below the entry list for all forms.

function display_custom_text($form_id) {
  echo 'This is custom text below the entry list.';
}
add_action('gform_post_entry_list', 'display_custom_text');

Display form ID below entry list

This example shows the form ID below the entry list for all forms.

function display_form_id($form_id) {
  echo 'Form ID: ' . $form_id;
}
add_action('gform_post_entry_list', 'display_form_id');

Display custom content for specific form

This example displays custom content below the entry list for a specific form with the form ID 5.

function display_custom_content_for_form($form_id) {
  if ($form_id == 5) {
    echo 'Custom content for form ID 5';
  }
}
add_action('gform_post_entry_list', 'display_custom_content_for_form');

Display form title below entry list

This example shows the form title below the entry list for all forms.

function display_form_title($form_id) {
  $form = GFAPI::get_form($form_id);
  echo 'Form Title: ' . $form['title'];
}
add_action('gform_post_entry_list', 'display_form_title');

Display custom message based on the number of entries

This example displays a custom message below the entry list based on the number of entries for each form.

function display_entry_count_message($form_id) {
  $entry_count = GFAPI::count_entries($form_id);
  if ($entry_count > 100) {
    echo 'Wow! You have more than 100 entries!';
  } else {
    echo 'You have less than 100 entries.';
  }
}
add_action('gform_post_entry_list', 'display_entry_count_message');