Add a Unique ID to Each 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.

Prefer a sequential counter (1, 2, 3…) over a random code? See Increment a Count on Each Submission.

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 the form you want to edit.
  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 16-character token for each submission and stores it in this hidden field. Example: 03bc431d0d605ce4.
  8. Save the form.

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.

Frequently Asked Questions

Can I show the unique ID on the thank-you message after submit?

Yes. Drop the {field.unique_id} Smart Tag into the form's confirmation message, exactly as you would in an email, and the ID appears on screen right after the visitor submits.

Can I format the ID, like ORDER-xxxx?

Yes. Combine static text with the Smart Tag in the Default Value field, for example ORDER-{randomid}, and the prefix is stored alongside the random part.

Will the same random ID ever repeat?

In practice, no. The only edge case is aggressive caching serving the same generated value to more than one visitor (see the warning above). If you need a guarantee, pair it with server-side validation.

Last updated on Jun 24th 2026 15:06