Submit a Multi-Page Gravity Form Without Going Through All Pages

Aug 3, 2026

4 Min. Read

Share URL

This page may contain affiliate links. Please read my disclaimer for more information.

Problem

Multi-page forms are great for breaking long surveys or applications into digestible chunks, but they rely on a rigid assumption: the user must click through every page to reach the Submit button on the last.

That becomes a problem when the first few pages capture everything you actually need, and the rest is just bonus detail. You don’t want to force people to hammer the Next button five times just to finish.

Solutions

Gravity Forms doesn’t provide a “Submit from any page” switch in the UI, but with a small snippet, you can add a Submit button to every page.

Option 1: Code Snippet (Free)

This snippet adds a “Submit Now” button next to each “Next” button, allowing the user to submit from any page.

<?php
/**
 * Gravity Forms: Submit from any page.
 *
 * Adds a "Submit Now" button next to each Next button, and skips
 * required-field validation for pages the user has not reached.
 *
 * Replace 34 on line 15 with your fomrs ID number.
 *
 */
add_action( 'gform_register_init_scripts', function( $form ) {

	$form_id = (int) $form['id'];

	// Optional: only run on one form.
	// if ( $form_id !== 34 ) {
	//     return;
	// }

	$script = "( function() {
		var formId = {$form_id};
		var form = document.getElementById( 'gform_' + formId );
		if ( ! form ) {
			return;
		}

		form.querySelectorAll( '.gform_next_button' ).forEach( function( nextButton ) {
			if ( nextButton.parentNode.querySelector( '.gw-submit-now' ) ) {
				return;
			}

			var submitNow = document.createElement( 'button' );
			submitNow.type = 'button';
			submitNow.className = 'gform_button button gw-submit-now';
			submitNow.setAttribute( 'data-submission-type', 'submit' );
			submitNow.textContent = 'Submit Now';
			submitNow.style.marginLeft = '10px';
			submitNow.addEventListener( 'click', function() {
				var target = document.getElementById( 'gform_target_page_number_' + formId );
				if ( target ) {
					target.value = '0';
				}

				if ( window.gform && gform.submission && typeof gform.submission.handleButtonClick === 'function' ) {
					gform.submission.handleButtonClick( this );
				} else {
					jQuery( '#gform_' + formId ).trigger( 'submit', [ true ] );
				}
			} );

			nextButton.after( submitNow );
		} );
	} )();";

	GFFormDisplay::add_init_script( $form_id, 'submit_from_any_page', GFFormDisplay::ON_PAGE_RENDER, $script );
} );

add_filter( 'gform_field_validation', function( $result, $value, $form, $field ) {

	$form_id     = (int) $form['id'];
	$source_page = GFFormDisplay::get_source_page( $form_id );
	$target_page = (int) rgpost( "gform_target_page_number_{$form_id}" );

	// Final submit from an earlier page: ignore fields on later pages.
	if ( $target_page === 0 && (int) $field->pageNumber > $source_page ) {
		$result['is_valid'] = true;
		$result['message']  = '';
	}

	return $result;
}, 10, 4 );

What it does:

  • Finds every Next button on the form and injects a Submit Now button after each one.
  • Clicking Submit Now sets gform_target_page_number to 0, which tells Gravity Forms this is a final submit rather than a Next-page request.
  • Submits through gform.submission.handleButtonClick(), which is the current Gravity Forms 2.9+ submission path. Older versions fall back to jQuery trigger('submit').
  • On submit, gform_field_validation skips fields on pages after the page the user submitted from, so required fields on unvisited pages do not block submission.

Limitations & Caveats

  • Skipped pages are saved empty. Submit Now creates a completed entry, not a partial one. Fields on pages the user never reached will be blank. If you need abandoned/partial data, use the Partial Entries Add-On instead.
  • Current-page validation still runs. Required fields on the page they submit from must still be filled in.
  • Conditional logic. Fields hidden by conditional logic are not validated. That is core Gravity Forms behavior and is unchanged.
  • AJAX forms. The snippet registers with gform_register_init_scripts so the button is added again after each page render, including AJAX page changes.
  • Gravity Forms version. Written for Gravity Forms 2.9+. Buttons are <button> elements, and submission must go through gform.submission.handleButtonClick(). The old gf_get_input_id_by_html_id helper is not used.

Option 2: Restructure with Conditional Logic (No Code)

If you don’t want to touch JavaScript, redesign the form so later pages are optional:

  1. Add a field on the first page (Radio Buttons or Drop Down): “Do you want to add extra details?” with choices Yes / No.
  2. On every later page, open the page’s settings and enable Conditional Logic.
  3. Set the condition: Show this page if “Do you want to add extra details?” is Yes.
  4. Make sure fields on those later pages are not required. Required fields on hidden pages will still block submission.

Now, a user who selects No sees the Submit button on page 1 because Gravity Forms hides the remaining pages entirely.

Need More Help?

If you still need help, feel free to use the comments or chat options below.

Photo of author
About the Author
Chris Eggleston
Husband. Father of 4. Grandpa of 2. Chief Problem Solver exploring business systems, technology, AI & faith — helping people solve real problems. @mantiswp @chrisegg

Support Chris - Donate $5

Gravity Wiz Add-Ons

Advertisement

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments

Related Post

Submit a Multi-Page Gravity Form Without Going Through All Pages

How to let users submit a multi-page Gravity Form from any page using a free JavaScript snippet or by restructuring with conditional logic.

Aug 3, 2026

4 min. read

Change Radio Button Selection When Typing a Custom Value in Gravity Forms

A lightweight JavaScript snippet that automatically selects the "Other" radio button when a user types a custom donation amount into a Gravity Forms text field.

Jun 9, 2026

3 min. read

Styling Gravity Forms Radio Buttons Like Toggle Switch

Problem I recently had someone ask if it was possible to style radio buttons like a toggle switch in Gravity...

Mar 17, 2026

4 min. read

Automatically Switch from a Registration Form to a Waitlist in Gravity Forms

This tutorial shows you how to automatically switch from a registration form to a waitlist form in Gravity Forms using entry limits or attendee tracking with a custom shortcode.

Sep 29, 2025

4 min. read

Using AI + Gravity Forms to Streamline Job Applications

Hiring is tough. Sorting through dozens, or even hundreds, of job applications is time-consuming, repetitive, and prone to human bias. That’s where combining Gravity Forms, Gravity Flow, and AI automation comes in.

Sep 26, 2025

2 min. read

Turn Gravity Forms Image Choice Field into carousel

Problem Recently, I saw a Gravity Forms user looking for a way to style the new Image Choice field. Specifically,...

Jul 14, 2025

3 min. read