gravityflow_entry_detail_content_after

Description

The gravityflow_entry_detail_content_after action allows custom code/content to be displayed after the primary form elements on the entry details page.

Parameters

ParameterTypeDetails
$entryEntryThe current form.
$formFieldThe entry currently being displayed.

Examples

Add contextual info after the entry detail

Provides additional support by offering a custom style or tone guide for customer communications or a brand guide for icons and materials without incorporating it into the instructions above the entry details page.

add_action( 'gravityflow_entry_detail_content_after', 'jo_materials_after_entry_details', 10, 2 );
function jo_materials_after_entry_details( $form, $entry ) {
     $api = new Gravity_Flow_API( $form['id'] );
     $step = $api->get_current_step( $entry );
     //Adjust the array entries to match the Step ID(s) you want the materials to show up on
     if ( in_array( $step->get_id(), array( '10', '15', '22' ) ) {    
          echo '<h3>Support Materials</h3>';
          echo '<ul><li><a href="https://gravityflow.io">Example Link</a></li><li><a href="https://gravityflow.io">Example Link</a></li></ul>';
     }
}

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?