Show the summary on some pages only

Updated 14 September 2026

What is it?

Control on which pages the summary should appear. Since v2.1 there is a setting for this, the code below is only needed when you want to show or hide the summary based on something else, such as the value of a field.

Option 1: the setting

Open the Live Summary settings of your form. On the General tab you will find the Pages panel (only for forms with page breaks). Under “Display side summary on all form steps excluding” pick the pages where the summary should be hidden and save. Leave it empty to show the summary on all pages.

The Pages panel with two steps selected under Display side summary on all form steps excluding

Option 2: with code

To use this, copy one of the below code snippets to an HTML field or the Code Chest plugin. Be sure to wrap it between <script> Code goes here </script> tags if you use it inside a HTML field.

Next update the configuration bit and complete the summaryPages array with a comma seperated list of page numbers where you want to show the summary. The summary will be hidden on all the other pages.

Summary on mobile
When the “Summary on mobile” setting is set to “Bar at the bottom of the screen” (the default for new forms since v2.2), the summary is moved into a sheet and a bar is added at the bottom of the screen on small devices. The snippets below hide the summary container only. To hide the bar as well, hide the element with the id gotrls-mobile-bar-XX (XX is your form ID) in the same place, or switch the setting to “Above the submit button” for this form.

Example for versions below Gravity Forms 2.9

if (typeof jQuery !== "undefined") {
    jQuery(document).on('gform_post_render', function(event, form_id, current_page) {
        current_page = parseInt(current_page);
        /**
         * Configuration.
         * Add the page numbers where you want to show the form overview as comma separated list in the below array.
         * Example to show on page 1 and 3: let summaryPages = [1,3];
         */
        let summaryPages = [1]; 

        if (summaryPages.includes(current_page)) {
            jQuery("#gotrgf_form_overview_container_" + form_id).show();
            jQuery("#gotrgf_form_container_" + form_id).addClass("gotrgf_form_container");
            jQuery("#gotrgf_form_container_" + form_id + " > div").first().addClass("gotrgf_form_wrapper"); 
        } else {
            jQuery("#gotrgf_form_overview_container_" + form_id).hide();
            jQuery("#gotrgf_form_container_" + form_id).removeClass("gotrgf_form_container");
            jQuery("#gotrgf_form_container_" + form_id + " > div").first().removeClass("gotrgf_form_wrapper");     
        }
    });
} 

Example for versions above Gravity Forms 2.9+

document.addEventListener("gform/post_render", function(event) {
    /**
     * Configuration.
     * Add the page numbers where you want to show the form overview as comma separated list in the below array.
     * Example to show on page 1 and 3: let summaryPages = [1,3];
     */
    const summaryPages = [1]; // Adjust this array as needed

    let current_page = parseInt(event.detail.currentPage, 10);
    let form_id = event.detail.formId;

    let overviewContainer = document.getElementById("gotrgf_form_overview_container_" + form_id);
    let formContainer = document.getElementById("gotrgf_form_container_" + form_id);

    if (overviewContainer && formContainer) {
        if (summaryPages.includes(current_page)) {
            overviewContainer.style.display = "block";
            formContainer.classList.add("gotrgf_form_container");

            let firstDiv = formContainer.querySelector(":scope > div");
            if (firstDiv) {
                firstDiv.classList.add("gotrgf_form_wrapper");
            }
        } else {
            overviewContainer.style.display = "none";
            formContainer.classList.remove("gotrgf_form_container");

            let firstDiv = formContainer.querySelector(":scope > div");
            if (firstDiv) {
                firstDiv.classList.remove("gotrgf_form_wrapper");
            }
        }
    }
});

Didn’t find what you were looking for?

Or contact support and I will help you out.

Scroll to Top