gotrls_modify_summary_query

Updated 14 September 2026

On this page

Description

Changes the list of fields that a summary shows, after the settings were read. Every entry is a reduced field array with at least the id, label and type. Use it to reorder fields, leave one out or add one that cannot be selected in the settings.

A form specific variant exists as well: add _FORMID to the hook name, for example gotrls_modify_summary_query_3 for form 3.

Parameters

$summary_fields | Array. The fields of the summary, in order

$form | Array. The Gravity Forms form object

$type | String. ‘side’ for the side summary or ‘field’ for a Live Summary field

$field_id | Int|null. The ID of the Live Summary field, null for the side summary

Return

Array

Usage

Copy the below code to the functions.php of your child theme or to your snippet plugin.

<?php
add_filter( "gotrls_modify_summary_query", function( $summary_fields, $form, $type, $field_id ) {
    // Leave field 7 out of the side summary only.
    if ( 'side' === $type ) {
        $summary_fields = array_values( array_filter( $summary_fields, function( $field ) {
            return 7 !== (int) $field['id'];
        } ) );
    }
    return $summary_fields;
}, 10, 4 );

Since

version 2.0

Didn’t find what you were looking for?

Or contact support and I will help you out.

Scroll to Top