Default Value Gen

Generates custom IDs for Payload collections, such as UUIDs or auto-incremented numbers

Community 3 31/wk MIT v2.0.1

Installation

pnpm add payload-default-value-gen

About

Default Value Gen lets you choose how new documents get their ID in each collection you pick. Payload assigns IDs on its own, but some projects need a specific scheme, such as UUIDv7 values that sort by creation time or a numeric sequence that continues from the last record. The plugin runs your generator when a new document is created and writes the result into the ID field before validation. Collections you leave out keep the default behaviour. A built-in auto-increment helper covers numeric IDs, and any custom function that returns a string or number can be used instead.

Package info

Package name
payload-default-value-gen
Latest version
2.0.1
Unpacked size
426 kB
License
MIT
Weekly downloads
31
Last publish
Nov 8, 2025

More from kfiross

View profile

Scheduled and on-demand PostgreSQL backups with selective restore to S3 or Vercel Blob

Sends push notifications to phones and browsers through Firebase Cloud Messaging

Browse, upload and delete S3 bucket files from the Payload admin

Validation helpers for collection fields, covering regex, email, URL and IP address checks

Similar plugins

More in Content

Adds question-based conditions that decide which pages a visitor sees

Opens nested blocks and array rows in stacked panels with breadcrumb navigation

Click-to-edit overlays on the frontend that open the matching field in the admin

Inline editing on your live website for Payload content, with reviewed drafts

Visual drag-and-drop page builder for Payload collections with live canvas editing

Adds a parent field and breadcrumbs to collections so documents can nest inside each other