Fieldset
A native fieldset that names a group of related form controls.
Invoke published workflows and chatflows.
List messages, annotations and feedback logs.
Upload documents and edit indexed chunks.
Usage guidelines
- Use
Fieldsetwhen one question is answered by several controls: a checkbox or radio group, a multi-thumb slider, or a section of related inputs. A single control usesFieldalone. - Name the group with
FieldsetLegend, and keep a label on every control in it. For checkbox and radio options, wrap each option in aFieldItemwith its ownFieldLabel. - Render the group primitive through
render, as inrender={<CheckboxGroup />}, so the group element carries the legend name. Passvalue,defaultValueand change handlers to the group primitive; setdisabledon the outerFieldto disable the whole grouped field and its labels, or on aFieldItemto disable one option. - Every
Radiobelongs to aRadioGroup. Do not render a standaloneRadio. - Wrap a checkbox or radio group in a
Fieldwith anamewhen the group is one form value. TheFieldsubmits the selected values and carries the group'svalidateandFieldError; see Form for the flow.
Anatomy
A section of separate inputs uses Fieldset without render and without an outer Field; each input keeps its own Field.
Examples
Radio options with descriptions
A FieldItem scopes a label and a description to one option, so each radio is named by its label and described by its own text. Arrow keys move the selection inside the RadioGroup.
Finds chunks with a similar meaning to the query.
Matches the exact keywords in the query.
Runs both and reranks the combined results.
Section of related inputs
A plain Fieldset groups separate fields under one legend. Each input keeps its own Field, label and error.
Disabled group
Set disabled on the outer Field so the group, its options and their labels all enter the disabled state. A FieldDescription in the outer Field explains why and describes every option.
The index method is fixed once a document is embedded with the economical method.
API reference
Fieldset
Groups a shared legend with related form controls such as checkbox groups or radio groups. Renders a <fieldset> element.
Provides group semantics and labeling; pass interactive state such as disabled and value to the underlying group primitive.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: FieldsetRootState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, FieldsetRootState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: FieldsetRootState) => React.CSSProperties | undefined) | No default | |
| Attribute | Description |
|---|---|
data-disabled | Whether the component should ignore user interaction. |
FieldsetLegend
An accessible label that is automatically associated with the fieldset. Renders a <div> element.
| Prop | Type | Default | Details |
|---|---|---|---|
className | string | ((state: FieldsetLegendState) => string | undefined) | No default | |
render | ComponentRenderFn<HTMLProps, FieldsetLegendState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | No default | |
style | React.CSSProperties | ((state: FieldsetLegendState) => React.CSSProperties | undefined) | No default | |
| Attribute | Description |
|---|---|
data-disabled | Present when the fieldset is disabled. |