Quantcast
Channel: Snippets Archives - Gravity Wiz
Browsing all 196 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Gravity Forms Live Preview

Gravity Forms’ “preview” mode is an awesome utility for previewing new forms while you build them. No distractions with theme styling or any potential script conflicts. But what do you do when you...

View Article


Image may be NSFW.
Clik here to view.

Use List Field As Choices for Gravity Forms

I always have a hard time coming up with titles for snippets where the use case for something is not immediately obvious. Here’s a great use case that will help you understand the power of this handy...

View Article


Image may be NSFW.
Clik here to view.

Simple Split Testing with Gravity Forms

Matt Medeiros wrote an awesome article about A/B Testing with Gravity Forms (also known as split testing). Matt shared a small function which accepts two Gravity Form IDs. The provided form IDs are...

View Article

Image may be NSFW.
Clik here to view.

Customizing the Multi-File Merge Tag

Post generated with this snippet View this code snippet on GitHub. Gravity Forms v1.8 adds support for the much desired multi-file uploads field. Just add a File Upload field to your form, check the...

View Article

Speed Up Your Gravity Forms Testing: Unrequire Required Fields

View this code snippet on GitHub. I’ve been using this snippet for quite some time with my Gravity Forms development. I never thought to share it until a client was complaining to me about how much of...

View Article


Require Minimum/Maximum Character Limit for Gravity Forms

Have you ever received a generic comment or question in a form submission and wondered if there was a way to discourage this type of response? We’ve whipped up a little snippet that you can use to...

View Article

Image may be NSFW.
Clik here to view.

Rounding by Increments with Gravity Forms

Let’s say you sell business cards. Orders for these business cards must be placed in increments of 500. If you try to order 499 cards, you’re going to get 500. If you try to order 600, you’re going to...

View Article

Image may be NSFW.
Clik here to view.

Better Inventory with Gravity Forms

Let’s dive into the code first. View this code snippet on GitHub. How do I install this snippet?Easy peasy. Just copy and paste the code above into your theme's functions.php file. Do I need to modify...

View Article


Image may be NSFW.
Clik here to view.

Dynamically Populating User Role

Use this snippet in conjunction with Gravity Forms dynamic population functionality to populate the current user’s role into any form field. View this code snippet on GitHub. This snippet assumes the...

View Article


Image may be NSFW.
Clik here to view.

Disable Autocomplete for Gravity Forms

In my experience, autocomplete is generally more helpful than harmful but there are times when it just gets in the way. For those times, use this handy snippet by @ronalfy to disable this feature. This...

View Article

Image may be NSFW.
Clik here to view.

Set Post Status by Field Value (Advanced)

This tutorial/snippet expands on the Set Post Status by Field Value snippet. Here is a refresher on the issue: Currently, the post status of a post generated from a Gravity Form submission is set via...

View Article

Enable Decimal Values in Quantity Fields

Gravity Forms has some pretty comprehensive support for various pricing fields but one thing it does not provide is a weight field. So what do you do when you’re selling something by the pound? This...

View Article

Image may be NSFW.
Clik here to view.

Set a Minimum Order Quantity

Gravity Forms provides the ability to set a minimum per field when using a separate Quantity field but what about a minimum quantity for the entire order? This snippet can help! View this code snippet...

View Article


Limit IP to One Submission Per Time Period

The functionality in this snippet has been enhanced. I strongly recommend you use the “better” version: Better Limit Submission Per Time Period by User or IP A visitor asked on the Limit User to One...

View Article

Image may be NSFW.
Clik here to view.

Simple Ticket Inventory with Gravity Forms

This snippet has been improved to be easier to implement and provide more options (like hiding the field instead of the form and only counting paid submissions towards the limit). It’s still simple....

View Article


Set Number of List Field Rows by Field Value

View this code snippet on GitHub. Found this interesting question on the Gravity Forms forum: I’m selling tickets. So each ticket needs to be associated with a name/email/etc… Basically, the user needs...

View Article

Limiting How Many Checkboxes Can Be Checked

The snippet might look daunting but it only requires a quick copy and paste and two simple configurations to get it up and running! This functionality is available as a plugin with Gravity Perks. Save...

View Article


Random Fields with Gravity Forms

This snippet provides an easy way to show a random number of fields on your Gravity Forms. Let’s say you’re using Gravity Forms to power a simple questionnaire. You have five (5) questions total but...

View Article

Require All Columns of List Field

When you mark a List field as required, only a single input from any column is required. What if you want every input in every column to be required? Here is a snippet that let’s you do it. View this...

View Article

Image may be NSFW.
Clik here to view.

Conditional Confirmations

This snippet is deprecated. Gravity Forms v1.7 provides some really awesome support for conditional confirmations right out of the box. Consider this snippet deprecated. This snippet provides the...

View Article
Browsing all 196 articles
Browse latest View live