webiny-form-model
What it does
This skill guides your AI when building forms in the Webiny platform. It is for developers who want form fields, layouts and validation defined in a clear, declarative way.
When to use it
- ✓When you need to define text, date or other fields for a Webiny form using the builder.
- ✓When you want tabs, rows or separators in a form layout.
- ✓When fields should show, hide or validate depending on other field values.
Skill link
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/form-model/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Build a Webiny form with a title, a date and a status, where the date field only appears when the status is scheduled.”
5 new skills a week. 1 minute to read.
How it works
The skill shows how to define fields with a chainable builder, arrange them with a layout builder, and add validation or rules. Fields can also react to other fields' values.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Form Model
TL;DR
The Form Model is Webiny's declarative form system. Define fields with a fluent builder API (fields.text(), fields.datetime(), etc.), arrange them with a layout builder (layout.row(), layout.tabs(), etc.), and validate with Zod schemas or imperative rules. Fields support conditional visibility, computed values, reactive context from other fields (.context()), and deeply nested object/list structures with templates (dynamic zones).
Field Types
All fields are created via the fields registry callback. Each builder method returns a chainable builder.
Text
fields.text();
Default renderer: textInput. Value: string | null.
fields.text().label("Title").placeholder("Enter title").required("Title is required")
fields.text().renderer("textarea", { rows: 4 })
fields.text().list().renderer("tags").defaultValue([])
fields.text().list().renderer("textInputs", { addItemLabel: "Add text" })
fields.text().list().renderer("textareas", { addItemLabel: "Add description" })
fields.text().renderer("codeEditor", { language: "html", height: 300 })
fields.text().options([
{ label: "Option A", value: "a" },
{ label: "Option B", value: "b" }
]) // auto-switches to "select" renderer
fields.text().options([...]).renderer("radioButtons")
fields.text().list().options([...]).renderer("checkboxes")
// Dynamic options — callback receives { field, form }, re-evaluated reactively
fields.text().options(({ form }) => {
const type = form.field("general.type").getValue();
return getOptionsForType(type);
})
Number
fields.number();
Default renderer: numberInput. Value: number | null. Auto-normalizes to number.
fields.number().label("Count").placeholder("0").required();
fields.number().list().renderer("numberInputs", { addItemLabel: "Add number" });
fields.number().options([
{ label: "Tier 1", value: 100 },
{ label: "Tier 2", value: 200 }
]);
Boolean
fields.boolean();
Default renderer: switch. Value: boolean | null.
fields.boolean().label("Featured").defaultValue(false);
DateTime
fields.datetime();
Default renderer: dateTimeInput. Pick a variant method to set the subtype:
| Variant | Value Format | Example |
|---|---|---|
.dateOnly() |
"2026-05-01" |
Holidays, due dates (birthdays: see the birthday picker below) |
.timeOnly() |
"14:30:00" |
Opening hours |
.withTimezone() |
"2026-05-01T14:30:00+02:00" |
Events tied to a locale |
.withoutTimezone() |
"2026-05-01T14:30:00.000Z" |
Timestamps, logs |
.monthOnly() |
"2026-05" |
Billing cycles |
.weekOnly({ startsOn: 1 }) |
"2026-W18" |
Sprint planning |
.yearOnly({ range: [2020, 2035] }) |
2026 (number) |
Fiscal years |
.dateRange() |
{ from: "...", to: "..." } |
Vacation requests |
.multipleDates() |
["2026-05-01", "2026-05-03"] |
Blackout dates |
.multipleMonths() |
["2026-01", "2026-03"] |
Seasonal availability |
.multipleYears({ range: [2020, 2035] }) |
[2024, 2025, 2026] |
Multi-year budgets |
Additional chainable methods:
.presets([
{ label: "Today", value: () => new Date() },
{ label: "In a week", value: () => addDays(new Date(), 7) }
])
.displayFormat("dd/MM/yyyy") // date-fns format tokens
.list() // switches renderer to "dateTimeInputs"
.dateGte("2026-01-01", "message?") // value must
FAQ
How is validation added?
The skill supports Zod schemas as well as simple imperative rules.
Can fields depend on each other?
Yes. The skill covers conditional visibility, disabling and fields that react to values from others.
Which renderer is used by default?
For text fields, the skill says the default renderer is a text input, and it can switch to other renderers such as a text area or select.
Details
Original description by the author
Building forms with the FormModel system — field types, renderers, layout, validation, conditional rules, computed fields, and dynamic zones. Use this skill when the developer needs to define form fields with the builder API, choose renderers, build layouts with tabs/rows/separators, add validation (Zod or imperative), use conditional visibility/disable rules, create computed fields, or work with object fields and templates (dynamic zones).
repo: webiny/webiny-js
Popularity
- GitHub stars
- 8.1k
- Ranking position
- #12576
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
prd-to-plan
8.1kHelps your agent turn a product requirements document into a phased plan of small end-to-end slices, saved as a Markdown file.
webiny-admin-architect
8.1kTeaches your agent how to build admin screens for the Webiny platform, using its business logic layers and presenter pattern.
webiny-admin-permissions
8.1kTeaches your agent to add permission controls to Webiny admin screens, including auto-generated permission forms and hide-or-show checks.
webiny-new-entry-wizard
8.1kTeaches your agent to add a custom setup wizard for new Webiny CMS entries, collecting a few fields first and then pre-filling the entry form.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.