Category: Snippets

Changing Your Gravity Forms Field IDs

The easiest way to change your field IDs.

Require an Existing Value for Submission with Gravity Forms

Ensure that a value entered in Form B has been previously submitted (or generated) on Form A. This is useful if you’re generating a reference number of some sort on Form A and would like the user to enter it on Form B.

Creating Coupons for GF Coupons Add-on with Gravity Forms

Dynamically create coupon codes for Gravity Forms which can be provided to the user for use on a subsequent form.

Numbering Gravity Forms List Field Rows

Download a quick bit of code to automatically add numbers to your List field rows in Gravity Forms.

Rename Uploaded Files For Gravity Forms

Rename uploaded files for Gravity Forms. You can create a static naming template or using merge tags to base names on user input.

Disable Autocomplete for Gravity Forms

Disable autocomplete for your Gravity Forms with this copy-and-paste snippet.

Shortcode: Display Number of Entries Submitted

Extends the [gravityforms] shortcode, providing a custom action to retrieve the total entry count for a given form. Also supports retrieving entry counts by entry status (i.e. “trash”, “spam”, “unread”, “starred”).

Creating Coupons for WooCommerce with Gravity Forms

Create coupons for WooCommerce with your Gravity Forms submissions and minimal configuration.

gravity forms auto populate date

How to Populate and Modify Dates and Times with Gravity Forms

Populate a Date or Time field with a modified value based on the current date/time or a user-submitted date/time.

Schedule a Post by Date Field with Gravity Forms

Schedule your Gravity Forms generated posts to be published at a future date. The scheduled date can be specified manually in the code or by the submitting user via Gravity Form Date and Time fields.

Use Gravity Forms Merge Tags in Your Post Content

Adds support for Gravity Form merge tags in your post content enabling the use of a single confirmation page for multiple forms, more control over the styling and layout of your confirmation pages, and persistent confirmation pages.

Require Minimum/Maximum Character Limit for Gravity Forms

Adds support for requiring a minimum and maximum number of characters for text-based Gravity Form fields.

Speed Up Your Gravity Forms Testing: Unrequire Required Fields

Filling out field after required field can rot your brain. Save a huge amount of time by automatically unrequiring required fields.

Customizing the Multi-File Merge Tag

A simple way to create custom templates for displaying files uploaded via a Multi-File Upload field. Image files can be displayed as images, video files can be loaded as playable videos, PDFs (and other text file types) can be stylized to indicate the file type. The possibilities are endless.

Use List Field As Choices for Gravity Forms

Adds support for populating choice-based fields (i.e. checkboxes, selects, radio buttons) with values entered in a List field.