Tower Plugins

  • Plugins
  • Development
  • Support
    • Account
    • Pre Sales Questions
    • Customer Support
    • Manage Serial Key Usage
    • How To Videos
    • Frequently Asked Questions
  • Testimonials
  • Cart
  • Plugins
  • Development
  • Support
    • Account
    • Pre Sales Questions
    • Customer Support
    • Manage Serial Key Usage
    • How To Videos
    • Frequently Asked Questions
  • Testimonials
  • Cart

Unique Id Field for Gravity Forms

$15.00

This plugin adds a button called ‘Unique ID’ to your Gravity Form Advanced Fields group. Add it to your form to automatically include a unique id with each successful submission.

Categories: Gravity Forms Plugins, Plugin, Wordpress Version 1.5
Compatible with Gravity Forms 2.x and Wordpress 6.x, PHP 8
  • Description
  • Read Me
  • Available Hooks

Product Description

Generate a unique id in a hidden gravity form Unique Id Field.

This plugin adds a field button called ‘Unique ID’ to your Gravity Form Advanced Fields group. Add it to your form to automatically include a hidden unique id field with each successful submission.

This plugin is superior to other ways of adding a unique id:

  1. It populates the unique id when the entry is saved. Therefore, it is
    • available in your merge tags
    • can be included in email notifications
    • can be made available to third parties after submission
  2. It checks for the unique id generated in any of your forms. Just to make sure it is indeed unique to your website.

The Unique ID Field works out of the box. No modifications are necessary.

The unique id is prefixed with AZ_ but you can change that by adding this code to your functions file:

add_filter( 'az_gf_uid_filter', 'my_function_to_change_prefix');
function my_function_to_change_prefix ($prefix) {
  return 'XYZ_'; 
}

 

(Change XYZ_ to what you would like for your prefix.)

There is a filter to change the entire unique id if you want :

add_filter('az_gf_value_filter','change_value_to_timestamp'); 
function change_value_to_timestamp($value){ 
   return current_time('timestamp'); // change the unique id to the current timestamp using your WordPress timezone setting 
}

 

Geek alert:

This plugin uses PHP’s uniqid function. Read more here: http://php.net/manual/en/function.uniqid.php
Get the value of the unique id after submission by input id if known:

$unique_id = rgar( $entry, ’24’ )

or using GF API if not known.

Example:

$unique_id_fields = GFAPI::get_fields_by_type( $form, [‘az_unique_id’] ); $unique_id = rgar( $entry, $unique_id_fields[0]->id );

Content of the plugin ReadMe.txt file located in your plugin:

This is a plug ‘n play plugin. Just add the Unique Id field to your form and it works.

Should you wish to modify the unique id, there are two filters:
az_gf_value_filter which changes the entire value (be careful here!)
az_gf_uid_filter which changes the prefix

Examples:

add_filter(‘az_gf_value_filter’,’change_value_to_timestamp’);

function change_value_to_timestamp($value){
return current_time(‘timestamp’);
}

add_filter(‘az_gf_uid_filter’,’change_prefix’);

function change_prefix($value){
return ‘My_Prefix_’;
}
example to set the prefix within a form (does not work with ajax)
add_filter(‘az_gf_uid_filter’,’az_get_prefix_from_post’);
function az_get_prefix_from_post($prefix){

if (!empty($_POST)){

$my_field_id = 2;
$new = sanitize_text_field($_POST[‘input_’.$my_field_id]);
if (!empty($new))
$prefix = $new;
}
return $prefix;
}

Available hooks in the plugin:

Change the prefix from ‘AZ_’ before the id is generated:

$prefix = apply_filters( 'az_gf_uid_filter', 'AZ_' );

Filter the generated unique id:

$id = apply_filters( 'az_gf_value_filter', $id);

Related Products

Copy Feeds Plugin for Gravity Forms

$18.00

eTapestry Mapping Plugin for Gravity Forms

$119.00

Plugin Reviews

Chelsea
Director of Marketing

Just confirming your help on this was great and we were able to get this set up. This ticket can be closed! Thanks very much,

Owen
Customer

Wow, your help and support is second to none. Very great full.

Jon
Developer

First off, love the plugin! It works just as it should.

Gordon
Developer

You have been a rock star!  I won't hesitate to use or recommend your plugin in the future.

John
Entrepreneur

This did exactly what I need and worked perfectly!

Jennifer
Developer

Thanks for all your help these past two days!

Richard
Developer

And thanks for getting back to us so promptly!

Aaron
Customer

Thank you for the quick response! This plugin is great!

Jon
Designer

I have a happy client and you have a happy customer! 🙂 Thanks for your attention today. I greatly appreciate it.

Andy
Customer

Bought and tested the plugin. Works as claimed. Thank you so much.

Ogechi
Design Director

Thank you for all your help Ryn! We got it all figured out.

Michelle
Developer

Perfect! Thank you very much. [...] Please close this ticket with my appreciation.

Shaun
Developer

Thank you for all of your time, it's the quickest I have ever heard from a WP Plugin author!

Tracy
Designer

Thanks very much for prompt reply.

Steven
Development Director

Thank you again for this amazing plugin 😊

Ellen
Developer

This is a great plugin, it worked right away.

Graciela
Business Owner

Thank you for your great customer service and timely responses!

Tamra
Developer

... this worked great! Thank you!

Kate
Designer

Just tested it and it's all working as intended now! Thanks again for your timely support.

Keith
Chief Marketing Strategist

The CIM for authorize and it turns out it’s idiot simple and works like a charm. Totally awesome! Thanks Amy! You’re someone to know for sure!

Custom Development Reviews

Live Video CoParenting
Custom Joomla Component

Amy is skilled, intelligent and easy to communicate with. She completed the job to my complete satisfaction. I recommend this contractor highly.

Zenvea Essential Oils
Owner

Consistently excellent service over multiple projects. Highly recommended.

Gain Management
Custom Plugin

I want to thank Amy for delivering on every promise, I needed a custom merchant site built to meet my needs and Amy delivered exactly what I requested on time and on budget. She is very responsive and clearly a master of her field. I highly recommend her to prospective clients!

client screenshot
A1 Transmission and Gear

Amy Hill is extremely knowledgeable, energetic and dedicated to getting it right, PLUS on top of that she is very easy to work with.  It can be a bit intimidating to work with some computer programmers but with Amy that’s not a problem. Another top notch fact about Amy is how she can be so creative.  By the time I finish with my daily business I don’t have much energy to think hard about my website, all I have to do with Amy is give her a couple broad thoughts and she’s able to see what I’m trying to do and she delivers the product ASAP which lets me to go back to my regular job with a smile on my face.  I highly recommend her services!

Pro Credit Fix
eCommerce Solution

Excellent job!!!!!!

Jely Finger Guitars
eCommerce Website

We are so very grateful for our affiliation with this talented lady.

Lawmart
eCommerce Website

Amy Hill is a wonderfully competent website developer who knew exactly what I needed to update my website with a new look and improved user/admin interface. She also greatly improved the e-commerce functionality of the site to make it faster, smoother and more reliable. Many times she knew what I needed before I even asked for it, and when I did want changes made, she made them quickly and efficiently. She delivered the project on time and within budget, and I have no hesitation to use her services again.

Golf Squad
eCommerce Solution

Amy was awesome and finished the job with ease and professionalism. She was able to complete a job that several other local freelancers were not able to do … it is a huge relief to our company and I would definitely recommend her!

Global Sat Phone
Issue Resolution

Amy did a great job of solving our Opencart/Joomla issues for our site migration. She was quick to fix all the unknown issues that came up.

Down River Equipment
Custom Plugin

Don't ever leave us!

Freedom Service Dogs
Custom Plugin

Great work  ... I love, love, love it!

Copyright © 2022 Anvil Zephyr, LLC
  • Support
  • Account
  • Manage Serial Key Usage
  • Terms and Conditions
We use cookies to ensure that we give you the best experience on our website. We have no intention of treating you like anything other than the amazing customer you are!
If you continue to use this site we will assume that you are comfortable with that.
OkRead Policies