The “gform_order_summary” filter in Gravity Forms filters the markup of the order summary which appears on the Entry Detail, the {all_fields} merge tag and the {pricing_fields} merge tag.


The base filter which would run for all forms and fields can be used like so:

add_filter( 'gform_order_summary', 'your_function_name', 10, 3 );

You can limit the scope of the filter to a single form by appending the form id on the end of the hook name like so:

add_filter( 'gform_order_summary_6', 'your_function_name', 10, 3 );


  • $markup string

    The order summary markup.

  • $form

    The current form.

  • $entry Entry Object

    The current entry.

  • $order_summary array

    An array containing the products, options and shipping for the current entry.

  • $format string

    The format with which the markup should be formatted. Accepted values are ‘html’ or ‘text’.


1. Add a Row to the Order Summary Table Footer

Note that the markup differs slightly depending on the location the filter is called. When generated for the {all_fields} and {pricing_fields} merge tags, inline styles are included. When called from the Entry Detail view, inline styles are not included.

We recommend using GFCommon::is_entry_detail() to check if you are on the Entry Detail view. Otherwise, assume the generated markup is for one of the merge tags.

add_filter( 'gform_order_summary', 'allow_basic_tags' );
function allow_basic_tags( $allowable_tags ) {
    if( GFCommon::is_entry_detail() ) {
        $row = '
                <td>My Custom Option</td>
    } else {
        $row = '
                <td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; text-align:right; width:155px; font-family: sans-serif;"><strong style="font-size:12px;">My Custom Option</strong></td>
                <td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; width:155px; font-family: sans-serif;"><strong style="font-size:12px;">$10.00</strong></td>

    $markup = str_replace( '<tfoot>', '<tfoot>' . $row, $markup );


This code should be placed in the functions.php file of your active theme.

Source Code

This filter is located in:

  • GFCommon::get_submitted_pricing_fields() in common.php
  • GFEntryDetail::lead_detail_grid() in entry_detail.php


Add in Gravity Forms

Last modified: March 17, 2018