Stamp every submission with your own reference number — a ticket number, an order number, a registration code — generated on the server the moment the entry is saved.
The value is built from a prefix and suffix around either a sequential counter or a random token, so INV-0042/2026 or REG-K7M2QX9P are both a few settings away. Because it is stored like any other field, the reference appears in email notifications, PDFs, webhooks and integrations through the usual {inputs.*} smart codes.
Use Cases
- Support tickets – Give every request a number people can quote back to you:
TICKET-0117. - Order and invoice references –
INV-0042/2026, incrementing safely across concurrent submissions. - Registrations – Hand attendees a short, readable confirmation code they can be checked in against.
- Claim or lookup codes – A random token that can’t be guessed by counting up from someone else’s.
Setup Instructions
1. Enable the field
- Navigate to WordPress Dashboard → Settings → Form Enhancer
- Open the Fluent Forms tab and find Unique ID Field under Fields
- Toggle it ON
2. Add it to a form
- Open your form in Fluent Forms → All Forms
- In the field panel, open Advanced Fields
- Drag Unique ID – Form Enhancer onto the form
The field is hidden — visitors never see it and cannot fill it in. It behaves like Fluent Forms’ own Hidden Field, except the value is generated by the server.
3. Configure the format
| Setting | Applies to | Description |
|---|---|---|
| ID Type | both | Sequential number (an incrementing counter) or Random token (an unguessable code). |
| Prefix | both | Static text before the number or token, e.g. INV-. |
| Suffix | both | Static text after it, e.g. /2026. |
| Starting Number | sequential | The first number to issue. |
| Zero-Padding (digits) | sequential | Pad with leading zeros to this width — 4 turns 42 into 0042. Use 0 to disable. Max 20. |
| Token Length | random | Characters in the token, 4–64 (default 8). |
4. Use the value
Reference the field by its name in any smart code, exactly like a regular field — for example in an email notification:
Your reference number is {inputs.unique_id}
Key Features
Sequential numbers are race-safe
This is the reason the field exists. Fluent Forms’ own serial_number is read, incremented, and written back — two submissions arriving at the same instant can read the same value and both get it.
The Unique ID counter instead lives in its own database row and is advanced with a single atomic statement, so concurrent submissions can never draw the same number. If the counter cannot be advanced for any reason, the field falls back to a random token rather than risking a duplicate.
Counters are per form and per field
Each Unique ID field on each form keeps its own counter, so two forms number independently, starting from their own configured value.
The counter is keyed to the field’s internal editor key rather than its name — renaming the field does not restart the numbering, and no number is ever reissued.
Raising the starting number moves the counter forward
Changing Starting Number to a higher value jumps the counter up to it — useful when migrating from an existing numbering scheme and you need to continue from, say, 5000.
Lowering it has no effect. Numbers already issued are never handed out again.
Random tokens are readable out loud
Tokens are drawn with a cryptographically secure random source from an unambiguous alphabet — I, L, O, 0 and 1 are excluded — so a code survives being read over the phone or retyped from a printed email without the classic “is that a zero or an oh?” problem.
The value can’t be tampered with
The hidden input is client-controlled, so whatever the browser submits is always discarded and overwritten server-side. Nobody can choose their own reference number by editing the page.
Available everywhere the entry is
The value is generated before the entry is stored and before any feed runs, so it reaches email notifications, PDF templates, webhooks and every integration — the same as a field the visitor typed into.
Limitations
- Not usable in conditional logic. The value only exists after submission, so a condition on it could never match while the form is being filled in. The field is deliberately kept out of the condition dropdown — the same as Fluent Forms’ own Hidden Field.
- Numbers are not gapless. A number is drawn when the entry is saved. Deleting the entry afterwards does not return its number to the pool, so a deleted entry leaves a gap. If you need a strictly gapless sequence for accounting purposes, generate it in your accounting system.
- Uniqueness is per counter, not global. Two different forms both starting at 1 will both issue
0001. Use distinct prefixes when the references need to be unique across forms.
Notes
- Where counters are stored: in the WordPress options table, one row per form + field, named
formenhancer_unique_id_{form ID}_{field key}. They are not autoloaded, and they are removed when the plugin is uninstalled. - Collision odds for random tokens: the default 8-character token from a 31-character alphabet gives roughly 850 billion combinations. Raise Token Length for very high volumes.
- Changing prefix or suffix affects new submissions only — values already stored on existing entries are never rewritten.
Table of Contents