Adding a Unique ID to Each Form Submission

Each form submission in Convert Forms already has a built-in unique ID. This is a sequential number (e.g., 1, 2, 3…) that serves as the primary key for identifying each entry in the system.

While this built-in ID is perfectly fine for internal use, there are situations where you may want to generate a different type of identifier, one that’s random, less predictable, or formatted differently. For example, you might want to display a custom reference number to users after they submit a form, such as an order confirmation code or a case number. A custom ID can also be useful when syncing data with third-party systems that require a specific token format, or when you don’t want users to guess how many submissions your form has received.

Add a Hidden Field to Your Form

Follow the steps below to generate a unique reference number for each submission using Convert Forms.

  1. Log in to your Joomla administrator
  2. Go to Components → Convert Forms
  3. Click to edit your form
  4. Go to Fields → Add Field
  5. Add a Hidden field to the form
  6. Set the Field Name to unique_id or something similar.
  7. Set the Default Value to the {randomid} Smart Tag. The Random ID Smart Tag creates a random 8-character token for each submission and stores it in this hidden field. Example: 03bc431d0d605ce4.

add randomid to submission

Hidden fields are not visible inside the form to your visitors, but we’re using this field to store the unique ID for internal reference so that it will display on the entry.

If your site uses aggressive browser, server, or plugin-level caching, there’s a small chance that duplicate random IDs could occur. If you need guaranteed uniqueness, you may need to implement server-side validation or use a different approach.

Adding the Unique ID to Email Messages

To include the unique ID in your email notifications, use the Smart Tag for the hidden field. If your field is named unique_id, use {field.unique_id}.

This will output the random ID in your email message, making it easy to reference in communications with users or backend workflows.

Last updated on Mar 31st 2026 08:03