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

Image may be NSFW.
Clik here to view.

Numbering Gravity Forms List Field Rows

View this code snippet on GitHub. Here’s a quick bit of CSS that will automatically number your Gravity Forms List field rows. It does this using CSS psuedo elements within each row to add a “number”...

View Article


Creating Coupons for WooCommerce with Gravity Forms

View this code snippet on GitHub. Offering a coupon is a great way to incentivize users to fill out any form. Want to provide a compelling incentive for visitors to sign up for your newsletter? Offer...

View Article


Creating Coupons for GF Coupons Add-on with Gravity Forms

View this code snippet on GitHub. Submitting a Gravity Form is a powerful thing. After the the submit button is pushed, any number of things could happen. You could register the submitter as a user on...

View Article

Image may be NSFW.
Clik here to view.

Require an Existing Value for Submission with Gravity Forms

View this code snippet on GitHub. Let’s say a reference number is generated on Form A (using something like GP Unique ID) for the user’s order (represented by a Gravity Form entry). The reference...

View Article

Create Dynamic Post Excerpts with Gravity Forms

Gravity Forms provides an awesome option to create a “Content Template” for the Post Title and Post Body fields; however, the lowly Post Excerpt feel does not have this option. Here’s a quick snippet...

View Article


Image may be NSFW.
Clik here to view.

Rounding by Increments with Gravity Forms

View this code snippet on GitHub. 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...

View Article

Better Limit Submission Per Time Period by User or IP

View this code snippet on GitHub. This snippet replaces both the Limit User to One Submission Per Time Period and the Limit IP to One Submission Per Time Period snippets. How do I get started? Gravity...

View Article

Calculate Number of Days Between Two Dates

View this code snippet on GitHub. Have you ever needed to calculate the number of days between two given date fields? Here’s a scenario for consideration. Let’s say you have a Gravity Form set up to...

View Article


How to Populate and Modify Dates with Gravity Forms

View this code snippet on GitHub. Way back when (in 2012), we wrote an article on how to populate a date, one year from the current date. We’ve rewritten this snippet to be more flexible, easier to...

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.

Multi-page Form Navigation

This snippet is available as a plugin with Gravity Perks. Buy Gravity Perks today to get this perk plus 21 other galatic Gravity Forms plugins! View the Plugin Buy Gravity Perks This snippet can add...

View Article

Limiting How Many Checkboxes Can Be Checked

This snippet is available as a plugin with Gravity Perks. Buy Gravity Perks today to get this perk plus 21 other galatic Gravity Forms plugins! View the Plugin Buy Gravity Perks The snippet might look...

View Article

Pro Tip: Skip Pages on Multi-Page Forms

This snippet is specifically for developers to avoid having to submit every page of a form when debugging issues or developing very large multi-page forms. If you’re looking for a way to allow users to...

View Article


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.

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


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

Auto-populate Gravity Form Credit Card Fields for Testing

View this code snippet on GitHub. Frustrated with entering sandbox credit card data into your Gravity Forms credit card fields? This snippet intelligently populates gateway-specific testing credit card...

View Article


Rename Uploaded Files For Gravity Forms

View this code snippet on GitHub. We wrote a snippet that will allow you to create a dynamic naming template for your uploaded Gravity Form files. This includes the ability to prepend, append or...

View Article

Creating Coupons for GF Coupons Add-on with Gravity Forms

View this code snippet on GitHub. Submitting a Gravity Form is a powerful thing. After the the submit button is pushed, any number of things could happen. You could register the submitter as a user on...

View Article

Ban/Limit Email Domains for Gravity Form Email Fields

This snippet allows you to ban or limit any email domain(s) for your Gravity Form email fields. Want to ban users from entering test@test.com and spamming your registration form? Want to only allow...

View Article
Browsing all 196 articles
Browse latest View live