3 Things You May Not Know About The Gravity Forms Plugin
Gravity Forms is the WordPress plugin of choice for many power users and developers. In this post we uncover a group of lesser known but powerful features of this brilliant form building plugin.
“Feature blindness” is a term that I use to describe how some users (including me!) work with software. It refers to the fact that when you use a piece of software or a plugin you will often user the features you know, leaving a world of functionality outside the front door, in the cold. Anyone who’s used Photoshop will know what I mean, you use the tools you know and the rest – well we’ll learn it one day, right?
While many users have an understanding of the basic use of the Gravity Forms plugin, enough to build a form and insert it into a WordPress page, there is a huge amount of other cool stuff that this plugin can do.
So lets dig into one of the most popular WordPress plugins for creating and managing forms and show you some cool things.
Show & Hide Fields Based On User Input
You see this in forms all over the web, show a user a new field based on input they have entered on an existing field, useful in many situations. For example when a user chooses an option from a checkbox and you’d like to ask another question based on that answer.
Have a look at this example: if the user chooses the first two options we want nothing to happen, if they choose the third we want to ask them the second question.
Gravity Forms calls this feature Conditional Logic. In the form editor (see the next screen shot below) under the advanced section there an option to turn this on. Then you’ll see where the logic can be setup, in my example the second field will now only be shown when the user checks Darth Vader.
Pretty cool huh? And easy to do. This is just the tip of the iceberg, take a few moments to play around with these options and you’ll see how powerful this can be.
Pre-Populate Fields Via Query String
Imagine this situation: you’ve got a WordPress site that has a number of products listed, when a user makes an enquiry you want to save them the trouble of checking a box to state which product they’re interested in, instead detect the page that they’ve come from and check the box for them.
Here’s an example of what this field may look like.
So on each of your product pages where you link to the enquiry form we are going to setup a special query string URL to pass through the product to the enquiry form.
Let’s start setting up the field. In the Gravity Forms editor select the field then select the Advanced tab. Down the bottom check the box to enable dynamic population for this field and enter an parameter name; I’ve used enquiryType, see the screen shot below.
Now we’re going to place a link from a product page to the enquiry form and we need to send through the product that’s relevant for that page. It’s as simple as adding the parameter to the URL as a query string.
Example: In the example below you use this as the link to the enquiry form Yellow widgets will automatically be selected.
Before we leave this one, two more quick tips
- The URL is case sensitive, so if you’ve used upper case in the Parameter name use it in the URL as well
- The URL has to be encoded; in short put a plus sign (+) where spaces would normally be
Show Where The Form Was Completed
This last tip is great to see which pages are converting enquiries more that others. Take a situation where you have the form on multiple pages in your site or perhaps you have it in the sidebar of your site, so it’s on all pages.
What we’re going to do is add a hidden field that the user will not see, that simply sends the WordPress page through the form. When you see it in the entries section of Gravity Forms the data is there for you to see.
Follow these few steps:
- Insert a Hidden Field into your form (you’ll find hidden fields under Standard Fields)
- Label the field, I’ve called it Page Info
- Click the Advanced Tab to view the default value for your new field
Now here is where you setup the value that is going to be passed through the form. There are two you could choose from: The Page / Post title or the full URL of the page or post – it’s up to you which you would prefer.
So there you have three great features. If you have a question or would like more information about any of these please leave a comment!
Get Gravity Forms
Click on the banner below to access Gravity Forms and learn more about the plugin and check out their pricing options.Visit Gravity Forms
I’m a huge fan of gravity forms, it can do some really powerful things the conditional display of fields one of them. I still haven’t tried out the query thing, bit beyond my front ender level skills I would love to see a full real world example or even a tutorial.
We are a huge fan here as well. We are currently working on a new site launch with a partner and Gravity Forms has made it so much easier to setup all the membership and user account forms. Not only does it save a lot of time, but everything you can possibly need seems to be included – the add-ons are awesome!
Will keep that in mind, perhaps I can do a post around that in the future!
Great post on Gravity Forms.
I’ve just started using GF. Wondering, if you can throw some light on following 2 issues:
1. The font size of the input text is too small in the form. How do I increase the font size?
2. What’s the best way to use GF as an email optin form both in the sidebar as well as below the post. I am using MailChimp.
Again, is there any good step-by-step guide/ebook available for Gravity Forms?
Font size of text in forms will be affected by the CSS in your WordPress theme. So best place to work on increasing it is by targeting it in CSS.
On your mailchimp question, there is an add on from Gravity Forms that support Mailchimp, it’s very easy to use check their site for details.
Hello, I’ve been using Gravity Forms for awhile but am looking for something along the lines above. I need a simple radio button form with 3 options – when a particular option is selected and submitted the form takes you to the URL associated with each option. Any advice?
Zach, Gravity Forms does this automatically now via the new confirmations with redirect. Check out the forms confirmation and select the redirect option. Also this article is useful http://wordimpress.com/capture-lead-in-gravity-forms-before-submission/
Great article cheers, but do you know how you encode the URL to put a plus sign (+) where spaces would normally be?
Hey James, I think what you might be looking for is the urlencode() PHP function. Google it and see if it will work for ya 😉
reading as much as i can that you have written about gravity forms, so I thought I’d throw this out there in case someone has insight. i’m new to this but purchased gravity forms developer license to be creating a registration form for a summer program. i’d like to include some sort of “login” so that after a parent registers one child (and creates a profile) they could then login to register a 2nd child — with selected fields (such as address, medical insurance provider, emergency contact) auto-filled. i’m sure this is possible, but because i’m new at this i’m having SUCH a hard time with a few things that aren’t working. any insight? direction? help you could provide?
thanks in advance. – m
Sounds like you should be able to do this quite easily, but it probably going to require you creating custom templates for this. Since you purchased the product have you tried requesting support from the developer? They might be able to assist you, otherwise you should hire a freelancer to help ya out 😉
Hello!! When I use Gravity Forms product add on with a grouped product the information that the customers insert at the form dont appear at my order. Anyone knows if I can do something about it? Tks so much!!!
If you purchased the plugin Karina, you can open a support ticket with Gravity forms and they should be able to help you out.
Hi AJ Clarke I assume I have purchased it since I have already tested! Thank you!
How can I use this so that when someone chooses a one of my variable options that is when the form shows up? I only need it if they are choosing a certain aspect of the product. I hope that makes sense. I know basic coding, and have never really got into anything advanced lol.
Have a look at the Gravity Forms “Conditional Logic” functionality.
Thanks a million…’pre-populate fields via query string’…Such a simple thing to achieve but how long did it take me (as a non-programmer) to find this out?! So glad I came across your post, you’ve helped me enormously!!
Gravity forms conditional logic looks OK but, unless I am missing something, there are form builders that do it better. In GF I can easily set a condition like X and Y and Z; or X or Y or Z; but what if I want X and (Y or Z)? FormDesk, for example (and I have no brief for FormDesk, I just want GF to get even better) can do that by simple menu choices.
Inside the actual forms I don’t think it’s possible, but I think you can do this via a custom function though, no?
Anyone ever tried to have a Form float with the user? As in, when the user scrolls down the page the form “sticks”? I don’t have the form setup as a widget, so the one plugin out there for this doesn’t really work for me.
Gravity Form Field Disappear When There’s Conditional Logic..
How can i resolve this ??
Thanks so much for the handy post. I have been using Gravity Forms for years and have never discovered the Parameter options before. These setting make my forms a whole lot more powerful and better to use. Good stuff 😉
i used gravity form plugin,and used drop down box but the msg in drop down is not going full in database what is the reason?
Please contact Gravity Forms for support with the plugin, they offer support as part of the purchase 😉
I just want to say that I like your posting. In fact I am using your site regularly. Your articles are very effective and i am very thankful to you for sharing this site with knowledgeable content .
Great article! Question: I am trying to figure out how to take an entire WooCommerce cart – with quantities, product titles, and total price and place it into a Gravity Form for submission (it’s like a bulk request quote instead of the user processing the order totals). Is there a way to pull that information into a GF with the Query String or some sort of extension/code? Thanks!
That sounds very cool and interesting, unfortunately it’s nothing I’ve had to deal with so I am not sure how you would go about doing that, but most likely it is possible. Have you tried contacting the Gravity Forms plugin developers to see if they can assist with it?