SchemasArtifactsForm
FormFieldsetLast updated on
Last updated on
Logical grouping of fields rendered as a section
FormFieldset defines a logical grouping of fields that are rendered together as a section. Unlike FieldsetField (which is a field type with type: "fieldset"), FormFieldset is a top-level grouping construct with its own identifier.
Properties
id: string
Fieldset identifier (slug)
title?: string
Title/heading for the fieldset
description?: string
Description/help text for the fieldset
fields: Record<string, FormField>
Map of field identifiers to field definitions
required?: boolean
Whether completion of the entire fieldset is required
order?: number
Display order hint (lower numbers first)
FormFieldset vs FieldsetField
| Type | Usage | Location |
|---|---|---|
FormFieldset | Top-level section grouping with its own id | Standalone grouping construct |
FieldsetField | Nested field with type: "fieldset" | Inside form.fields record |
Use FormFieldset when you need a named section with explicit ordering. Use FieldsetField when you want nested fields within the form's field hierarchy.
Examples
fieldsets:
- id: personal-info
title: Personal Information
description: Basic contact details
order: 1
required: true
fields:
firstName:
type: text
label: First Name
required: true
lastName:
type: text
label: Last Name
required: true
email:
type: email
label: Email Address
required: true
- id: employment
title: Employment Details
description: Current employment information
order: 2
fields:
employer:
type: text
label: Employer Name
jobTitle:
type: text
label: Job Title
annualIncome:
type: money
label: Annual IncomeGate cascade
A fieldset's visible and required gates cascade to its children, the same way they do for a nested FieldsetField:
- A hidden fieldset hides its entire subtree. Set
visible: false(or a condition that resolves false) and every descendant is hidden, transitively through nested fieldsets, regardless of each child's ownvisible. - A child's
requiredfollows its effective visibility. A child inside a hidden fieldset is never required, because hidden wins over required. - A parent's
requireddoes not force its children. An optional section can still hold required fields, and marking a fieldsetrequireddoes not make its children required.
So a fieldset only ever loosens its children downward (by hiding them); it never tightens them into being required.