Pro Tip: Skip Pages on Multi-Page Forms
Looking to improve the navigational experience of your multi-page forms? Try our Multi-page Navigation perk. This plugin also supports setting a custom starting page for visitors who may have already completed previous pages of your form!
I’ll admit it. I’m a bit of a Gravity Wiz. And as such, I do a good bit of testing on really long multi-page Gravity Forms. When you’ve got an eight page form and the issue you’re trying to debug is on – you guessed it! – the last page, it can be a very tedious and painful experience.
Do you know this pain of which I speak? If so, here’s a little snippet that single-handedly (and quite succinctly) puts all those painful multi-page debugging memories behind you.
How do I install this?
Just copy and paste this snippet into your theme’s functions.php file.
How does it work?
To skip a page, simply append the ?form_page=2
parameter to the URL of any page on which you are displaying a Gravity Form. Update the 2
to whichever page you wish to display.
Standard usage | http://yoursite.com/multi-page-form/?form_page=4 |
Used with other parameters | http://yoursite.com/?p=123&form_page=4 |
This snippet does a simple check to make sure the user is logged in before allowing any pages to be skipped. If you would like to lock this down so that only administrators can skip pages, let us know in the comments and we’ll be happy to demonstrate how this can be accomplished.
Summary
And there you have it! Working with multi-page forms just got a lot easier. Think of all those long forms with required fields on every page. You don’t have to shudder at the thought any more!
Improve your multi-page form’s UX.
Gravity Forms Page Transitions can bring your multi-page forms to life with buttery, fluid transitions between form pages, and automatic progression from one page to another as the user completes the last field on the current page.
When going from page to page in a multipage form, does any data previously entered into a given page, preserved when leaving that page and then re-entering it?
Hi John,
Yes, values entered in fields on a page are preserved when navigating the form.
Best,
Hello!
Could I remove the “&& is_user_logged_in” so it works for non-users? This code would work fantastically for a multiform-easypass project I am working on.
Hi Bas,
Yes, if you remove
&& is_user_logged_in()
it will work for non-logged-in users as well.This is great! However, when in mobile, it doesn’t seem to skip to the next page! Any thought on why this is?
Hi Abby,
When testing locally it seems to work on mobile and desktop.
If it won’t work for you, you can run a quick conflict test.
Best,
This is great. Question though. How do I set it to bypass a required field on the page I skipped?
Our GP Live Preview perk is perfect for this. When you preview the form with Unrequire activated, required fields won’t throw validation errors while navigating pages or submitting the form.
Hi! I also love your snippet! I used it for more than a year now but found out today (probably because of an Update) that it’s no longer working.
If I append ‘ ?form_page=2’. to an URL I receive the Error: ‘Oops! We could not locate your form.’ The URL/form is working fine if I address it directly. Also if I access the multi-page form via another form I also get redirected to an address as / ?form_page=2#gf_16
Thanks for your support!
Hi Martina,
We may have to take a closer look at your form and backend set up to identify what may be causing the error. If you are a Gravity Perks subscriber, could you please reach out to us via our support so we can assist you to troubleshoot this issue. Thanks! 😊
Hi David Thank you for this wonderful snippet i am facing an issue that if we jumped to next (2) page and if there is any error on the jumped page its going back to the first page with the error message at top and the end of the URL is turning to like this / ?form_page=2#gf_22
what will be the issue?
Hello, When mentioning an error on page two, what kind of error is coming up? This would require a more in-depth look into but Multi-page Navigation would allow the user to jump to any page of the form without error. If you are a Gravity Perks subscriber, could you please reach out to us via our support so we could take a closer look into your forms. Thanks! 😊
Hi david, i have a problem, i have a two page form, the first page is a checkboxes (images) i would like people to go from this page to the second one just on clicking one image without click on “next” button
Hi Yann, we have an early-access perk called GP Page Transitions that provides support for auto-progression. Pick up a copy of Gravity Perks and we’ll be happy to send you a copy.
Hello David,
I need your help with the following. I have this website with the multi-page application form.
Step 1: Registration using User Registration Step 2: Organization information – GF Step 3: Categories (Users can submit up to 3 categories)
The problem is, I want users who fill step 2 and hit next to be able to fill step 3 several times without the need of filling step 2 even after they login and logout. Also, even after days on their last submission.
Can you please help?
This would require a proper consultation to offer solid advice here but Multi-page Navigation would allow the user to jump to any page of the form. If you want to require the first step, you might consider making it a separate form so you can guarantee that the user is registered and then redirect to the next form which starts at Step 2.
Hey David very helpful as always!!
I have a question – hoping I’m not completely off-topic. Ive been using gravity forms for about 3 months now, have created 9 forms most of them multi-page.
In the front end, when i go from page one to page two, I usually see the ID of the form at the end of the url – for example http://www.yourdomain.com/form-page/#gf_10 (10 being the ID of the form).
In one of my forms this doesn’t show up and I’ve noticed that when refreshing the page it doesn’t shoot a message prompting me to resend the information (as it happens in all other forms) it just starts from page 1. In addition the form is really slow.
Any thoughts on that?
Hi Theodore, it sounds like the form withou the #gf_10 has AJAX-enabled. I wouldn’t expect this to slow your form down though. I’d reach out to Gravity Forms support on this one though. They’ll get you a definitive answer. 🙂
Hello David, I found your blog while trying to improve the experience with a form am Implementing. The problem I am having is I have a button before the forms shows up. After I click the button it loads the form, but since its a multi-page form, when I try to go to the second page it never scrolls down to the end of that page, thus not allowing the user to continue to “next” page. Is there a way to solve this that you can suggest
Thanks for all yur info!
Hi Marina, do you have a URL where I could see the form? I’m not sure I’m understanding your use-case.
Thanks for this, it’s a HUGE help! Your snippets are invaluable!
Glad to help, Jennifer!
YOU ARE MY HERO. This works flawlessly. I was about to roll it myself, but you saved me so much time!
Glad to hear it, Brent!
Hi David,
Thankyou for this great tip. I’ve fairly new to GF and been trying to accomplish something in multi-page forms. I have a form that takes in the user website address and on next button loads a page which asks additional questions. and then finally submit the form. What i’m trying to do is to send a email after the user clicks Next on the fist page with out any notification to the user. This is so so that i can capture the Website address even before the actual form is submitted. Can you or anyone reading this guide me on how to do this?
Hi Kashif, I think this might be what you’re looking for: http://travislop.es/plugins/gravity-forms-multi-page-notifications/
You are a live saver sir :) thank you so much!
Hi Great tip,may be u can help me with this I have a mutiple page form with one question per page, totalling 8 pages On the first page there an option to select your country — Norway or sweden if the person selects norway he continues as its asnwering all questions,but if he selectes sweden he jumps directly to Questions 6 and then follows 7 and 8. How do i make GF to skip some pages,conditonal logic somewhats fails here in the sense it does the questions but u get blank pages and have to click next ?? Any idea how do i go abt it ?
Anur
Hi Anur, you can determine whether a page is skipped via the “Page Conditional Logic”: http://grab.by/ERFY
The snippet to skip multi-page Gravity Forms worked for a long time, but no longer works. What’s going on?
Hi, This solution is completely not working after enabling “Enable form persistence”. This persistence method is by an add on plugin: “Gravity Forms Data Persistence Add-On”
Please provide some solution for this asap.
yeh..Got the solution. Need to paste your code in the plugin “Gravity Forms Data Persistence Add-On”. Go to Plugin editor of the “Gravity Forms Data Persistence Add-On”. You will see this page. gravity-forms-data-persistence-add-on/persistent_multipage_forms.php
Just paste the code at the end and its done :)
Thank You David for your awesome solution.
Glad you were able to find a solution. :)
David,
You are the bomb!
This little snippet is such a time saver. I just wish I had found this some days back. I was getting dizzy re-entering all those required fields over and over and over and ….
Plus: Your Multi-Form Page Navigation and your Better Pre-submission Confirmation are magical together. If you can even use the word “magical” and “form” in the same breathe. I don’t know.
Keep riding that “white horse.”
Shouting out from New Orleans.
Really appreciate the kind words Mark! Glad you found this useful. :)
Alright party people! After much ado, I present Multi-page Form Navigation! Give it a shot and give me suggestions for improvement. :)
Subscribing for update to :)
Thanks for a great post!
Registering for followup comments.
Thanks for the Pro Tip.
Any update David?
Hell yea David you got my vote (excuse my language heh).
I’ve literally begged the guys over at GF to help me with my script and they’re still scratching their heads atm.
Good stuff man,
Terry
What sort of cash are we talking about here David…
I’ve worked up a java script that allows your to go between pages by applying a style to each and every button and using the hide-show method.
Basically each page of the form is already loaded on the page so if you work some java magic you can use “conditions” to show and hide the segment of the form you wish to change. The issue with this is – well it’s buggy as all hell in IE (not so much in Chrome).
Anyhow hit me up here or on your pre-submission page you can see my big vommit of spam this morning when I was pulling my hair out trying to figure this one out….
Hi Terry,
I’m working on better page-navigation functionality for a client already and will be posting here soon. :)
My comment to Mike van Hoenselaar was about his request for repeating field groups.
Love to see that functionality working as well. You cant do anything dynamic. Everything is static. I want to add an element on the last page that generates a list of links. It only works on $_POST. So you probably have to do a post and set a value in hidden text input.
Another thing I would like is this:
You have a page to add a room with furniture. I want a button that says Add another room. When clicked I get the same page as the current one but I can add new information for the bath room for instance. I can keep doing this until I decide to got to the next step.
I solved it now just by making all the fields 10x statically on that page and work conditional magic. It is really time consuming :).
Any ideas on this issue?
Hi Mike, I am currently working on functionality that will let the user skip to any page on the form after it has been completed.
As for your other request, this is definitely something I’d love to tackle; however, it’s a big one and will require a lot of thought and effort to implement effectively. Typically on these bigger pieces of functionality, I wait until a user/client is able to help fund the development before I dive in. With that said, if you or any other user reading this would like to fund such a feature, let me know. :)
Hey David,
I was wondering if you’ve made any advances with that functionality. I tried my best and pulled out a number of hairs trying to get multi-pae navigation setup, without much success. Are you having better luck?
I noticed that when using this, it does not save the form data. As an example, I’m working on a multi-page form for submitting video slides. At the end, it shows a confirmation page (Thanks to your script!) and gives then the option to jump back to any one page for additional edits. But when they click the link, the entries are BLANK! In fact, all navigation between the slides using these links makes the pages blank. What ever can I do???
Hi Justin, this script is purely for debugging purposes. I can see the benefit of being able to jump back to any page and I’m actually going to be working on a project soon that requires that functionality. I’ll be sure to update this thread (and you) when that functionality is ready. :)
Hi Justin, I’m going to be doing this within the next couple of weeks. The project I referenced previously is still in progress. Please do feel free to remind me again if I haven’t posted a solution by mid-November. :)