Quantcast
Channel: Snippets Archives - Gravity Wiz
Viewing all articles
Browse latest Browse all 196

Pro Tip: Skip Pages on Multi-Page Forms

$
0
0
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.

View this code snippet on GitHub.

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 usagehttp://yoursite.com/multi-page-form/?form_page=4
Used with other parametershttp://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!


Viewing all articles
Browse latest Browse all 196

Trending Articles