• Trust CRM
CRM
  • Dashboard
  • Clients
  • Deals
  • Activities
  • Reports
Workspace
  • Mail
  • Calendar
System
  • Settings
  • Changelog
UI
  • Feedback
  • Localization
  • Form
  • Sidebar form
Components
  • Actions
  • Tabs
  • Inputs
  • Pickers
  • Date & time

Form

The six shapes a real edit screen runs into, each one live (docs/form.md).

1. Defaults and resetting

Unsaved means different from the default. Clearing and restoring the default are two different actions.

Fields with and without a default

Unsaved is measured against the DEFAULT, not against empty.

Put the default back and the unsaved marker goes with it.

No changes
2. Validation

Single-field rules attach per field; cross-field rules use refine and attach to the field to fix.

Single-field validation

Rules one field can settle on its own. The messages live in the schema, never in the markup.

Numbers arrive through `valueAsNumber`. `z.coerce` would change the schema's input and output types.

Cross-field validation

Rules that depend on two fields at once. The error lands on the one to fix. Note that refine only runs once the whole base schema passes, so while a single-field error remains above, these never get a turn.

09/16/2026
09/23/2026

Pick a date before the start and the error appears here.

No changes
3. Disabled and read-only

Read-only can be selected and copied, disabled cannot be touched. Both still submit their value.

Fields you cannot edit

Submit and the toast shows what arrived. Read-only and disabled both still submit their value.

`readOnly` can be selected and copied. Use it when the point is to show a value.

`disabled` cannot even be selected. Use it to keep hands off.

No changes
4. Nested and dynamic fields

Nesting by path, changing rows through useFieldArray. A rule about the array attaches to the array.

Nested fields

Nesting registers on a dotted path, and errors are read back along the same one.

Dynamic fields

useFieldArray owns adding and removing rows. A rule about the array itself attaches to the array.

Options

Radios go through Controller, and the value is a string enum.

No changes
5. Conditional fields

A field that is not shown is not validated. The display condition and the validation condition live in one place.

How to get in touch

Only the choice you make grows a field, and only a visible field is required.

Employer

The two fields below exist only while the switch is on.

0 / 500

No changes
6. Async submit

Stop while in flight, and return a server failure to the field rather than to a toast.

Async submit

Input stops while it is in flight, a failure lands on the field, and success redraws the baseline.

No changes