Description
The gform_entry_detail action allow developers to add extra text to the Entry detail page after the entry details are displayed and before Notes (if visible).
Usage
add_action( 'gform_entry_detail', 'add_to_details', 10, 2 );
Parameters
| Parameter | Type | Description |
|---|---|---|
$form | Form Object | The form from which the entry value was submitted. |
$entry | Entry Object | The current entry. |
Examples
Add text to an entry detail.
This example displays the listed text on all entries for form id 31 when viewing the Entry details.
add_action( 'gform_entry_detail', 'add_to_details', 10, 2 );
function add_to_details( $form, $entry ) {
if ( $form['id'] == 31 ) {
echo '<div>This hook is used to add additional information to the details page for an entry.</div>';
}
}
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This action is located in GFEntryDetail::lead_detail_page() in entry_detail.php.