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