Gravity Forms Unique ID – Form ID Plugin

1644755746 Gravity Forms Unique Id Form Id Plugin

Generate alphanumeric, numeric or sequential “Unique ID” values for the entry when submitted. Applications are endless!

This plugin is part of Gravity Perks, a suite of 37+ essential Gravity Forms addons with support you can count on.

What does it do?

This plugin provides a new Unique ID field type which generates a unique ID for the entry when submitted. Some common uses for this perk are:

  • Provide a set-length confirmation or reference number for each entry; could be displayed on the confirmation page and in notifications (i.e. “Your confirmation number is ABC142Z3”).
  • Maintain a sequential invoice number (a legal requirement for some countries)
  • Generate a unique coupon code that can be used on subsequent form submissions (tutorial coming soon!)
  • Generate a unique number for use in raffles

There are probably a hundred other ways this could be used. We would really love to hear how you’re using it!

Features

  • Generate unique IDs on form submission.
    Every form entry is assigned a unique ID.
  • Supports alphanumeric, numeric, and sequential numbering.
    Select the unique ID type that fits best.
  • Specify starting number, length, prefix, and suffix.
    Customize ID generation to your specific use case.
  • Merge tag support.
    Display Unique ID in form Confirmations, Notifications, and more!
  • Automatic updates.
    Get updates and latest features right in your dashboard.
  • Awesome support.
    We’re here to help! And we mean it.

Documentation

  1. How do I enable this functionality?
  2. Feature Details
    1. How does it work?
    2. Field Settings
      1. General Settings
        1. Field Label
        2. Type
      2. Advanced Settings
        1. Starting Number
        2. Length
        3. Prefix
        4. Suffix
    3. Display the Generated Unique ID
  3. FAQs
    1. Can Unique ID generation be delayed until after payment is approved?
    2. Can I use a Unique ID as a username for the Gravity Forms User Registration Add-On?
    3. I added a Unique ID field to an existing form. Can I retroactively populate Unique IDs for previous entries?
  4. Hooks

How do I enable this functionality?

After installing and activating Gravity Forms Unique ID, you’ll want to add a Unique ID field to your form. Let’s step
through that process.

Create a new Form or navigate to any existing Form. Find the Unique ID button under the Advanced Fields group. Click it to add the field to your form.

1644755743 491 Gravity Forms Unique Id Form Id Plugin

Modify the field settings as needed. See below for full details on the available field settings.

That’s it! Your form now has a Unique ID field that will automatically generate a unique ID when the form is
submitted.


Feature Details

How does it work?

When a form containing a Unique ID field is submitted, a unique ID is generated and populated for this field. The ID is unique to the form and field.

It’s important to note that in order to guarantee that the ID is truly unique, the field is populated only after the form has been successfully submitted. Since the field has no value prior to submission, this field is not visible on the frontend.

Field Settings

General Settings
1644755743 491 Gravity Forms Unique Id Form Id PluginGP Unique ID Standard Field Settings
Field Label

The label of the field. Visible in the {all_fields} merge tag and on the entry detail and entry list views.

Type

The type of unique ID that will be generated for this field.

  • Alphanumeric
    Contains letters and numbers (i.e. a12z9).
  • Numeric
    Contains only numbers (i.e. 152315902).
  • Sequential
    Contains only numbers and is sequential with previously generated IDs per field (i.e. 1,
    2, 3).
Advanced Settings
1644755743 454 Gravity Forms Unique Id Form Id PluginGP Unique ID Advanced Field Settings
Starting Number

Set the starting number for sequential IDs; only available when “Sequential” type is selected.

Length

Set a specific length for the generated ID (excluding the prefix and suffix) or leave empty to use default length. There are some differences in length requirements for each ID type.

  • Alphanumeric
    Requires a minimum length of 4.
  • Numeric
    Requires a minimum length of 9 and a maximum length of 19.
  • Sequential
    Length is used to pad the number with zeros (i.e. an ID of 1 with a length of 5 would be 00001). There is no minimum length.
Prefix

Prepend a short string to the beginning of the generated ID (i.e. abc123890678). You can use merge tags; the list is available via the “Merge Tags” icon located on the right of the field.

Suffix

Append a short string to the end of the generated ID (i.e. 123890678xyz). You can use merge tags; the list is available via the “Merge Tags” icon located on the right of the field.

Display the Generated Unique ID

You can display the unique ID generated for any unique ID field using the merge tag for that field. This will be available in the Gravity Forms’ default merge tag lists.

Unique ID fields are automatically included in Gravity Forms {all_fields} merge tag.

FAQs

Can Unique ID generation be delayed until after payment is approved?

If your form uses a first-party payment add-on (or a third-party payment add-on compatible with the Gravity Forms Payment Add-On Framework) then the unique ID can be generated once payment has been captured. This delay is enabled via the gpui_wait_for_payment filter.

Can I use a Unique ID as a username for the Gravity Forms User Registration Add-On?

Normally, the User Registration Add-On will throw a validation error since validation happens before the unique ID is generated. Use the following snippet to bypass the validation when a Unique ID field is configured for the username.

I added a Unique ID field to an existing form. Can I retroactively populate Unique IDs for previous entries?

You sure can! Use the following snippet to retroactively populate Unique ID fields. To use it, go to your home page and add the following parameters to the query string:

gpui_retro_pop=1&form_id=123

Make sure to replace 123 with your Form ID. The full URL will look like this:

After the URL is submitted, you’ll be greeted with a success message and updated entry count.

Hooks

Gravity Forms has hundreds of hooks. Check out our Gravity Forms Hook Reference for the most thorough guide to Gravity Forms’ many actions and filters.

0 0 votes
Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
Shopping Cart
  • Your cart is empty.
Scroll to Top