The gform_entry_info action allows you to add custom entry information to the Info area on the Entry detail page in Gravity Forms.
Usage
add_action('gform_entry_info', 'my_entry_info', 10, 2);
Parameters
- $form_id (string): The ID of the form from which the entry was submitted.
- $entry (Entry Object): The current entry.
More information
See Gravity Forms Docs: gform_entry_info
Examples
Display a simple “Hello” message
This example will output “Hello” in the Info panel on the Entry Detail view.
add_action('gform_entry_info', 'my_entry_info', 10, 2); function my_entry_info($form_id, $entry) { echo 'Hello'; }
Display the user agent
This example will display the user agent in the Info panel on the Entry Detail view.
add_action('gform_entry_info', 'display_user_agent', 10, 2); function display_user_agent($form_id, $entry) { echo 'User Agent: ' . $entry['user_agent']; }
Display the entry source URL
This example will display the entry source URL in the Info panel on the Entry Detail view.
add_action('gform_entry_info', 'display_entry_source', 10, 2); function display_entry_source($form_id, $entry) { echo 'Entry Source: ' . $entry['source_url']; }
Display the submission date
This example will display the submission date in the Info panel on the Entry Detail view.
add_action('gform_entry_info', 'display_submission_date', 10, 2); function display_submission_date($form_id, $entry) { echo 'Submission Date: ' . $entry['date_created']; }
Display custom text based on form ID
This example will display custom text in the Info panel on the Entry Detail view depending on the form ID.
add_action('gform_entry_info', 'display_custom_text', 10, 2); function display_custom_text($form_id, $entry) { if ($form_id == '1') { echo 'Custom Text for Form 1'; } elseif ($form_id == '2') { echo 'Custom Text for Form 2'; } }