FieldSetMany
Overview
A field that manages a list of values by rendering one instance of manyComponent per entry. Provides Add and Remove buttons so users can grow or shrink the list, and the first entry is always required while subsequent entries are optional.
Theme entry: FieldSetMany
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| iconOverride | Object | null | A partial icon registry ({ [componentName]: { [iconName]: { component, props } } }) merged with inherited and default icon entries; scopes icon overrides to this component and its descendants. | |
| name | String | yes | The field name, used as the path to look up and store the value in the form state. | |
| formModelName | String | undefined | The name of the form model for configuration lookup; usually provided by a parent field renderer. | |
| clearServerErrorDependents | Array | () => [] | Other fields whose server errors should be cleared when this field's value changes. | |
| validationDependencies | Array | () => [] | Other field paths this field depends on; their values are passed to validation and required functions. | |
| readOnly | Boolean | false | Whether the field is read-only; disables editing and skips required validation. | |
| required | Boolean | null | Whether the field is required. | |
| requiredMessage | String | "This field is required." | Error message shown when a required field is left empty. | |
| shouldRequireFn | Function | null | Custom function called with resolved field dependency values; determines whether the field should be required. | |
| isRequiredViolation | Function | null | Custom function called with the current field value; checks whether the value violates the required rule. Defaults to rejecting null, undefined, empty string, false, and 0. | |
| validate | Function | null | Custom validation function called with the current field value and resolved field dependency values; should return true when valid or an error message string when invalid. | |
| label | String | null | The label shown next to the field; defaults to the field name when omitted. | |
| help | String | "" | Help text displayed alongside the field. | |
| modelValue | String|Number|Boolean|Array|Object | undefined | The field's external model value; used only in contextless mode (v-model binding). | |
| contextless | Boolean | false | When true, the field ignores any surrounding form context and manages its own state. | |
| themeOverride | String|Object|Array | null | A partial theme object merged with the component's default theme; accepts a class string, class array, or theme object. | |
| manyComponent | object | yes | The component used to render each individual entry in the list. |
Slots
| Name | Scoped | Description |
|---|---|---|
label | yes | Override the field label. |
field(fieldName) | yes | Override the rendered row for a specific field entry. |
default | yes | |
destroy | yes | Override the delete button for a row. The slot receives onClick, disabled, and index as slot props; the first entry's remove is disabled rather than hidden. |
add | Override the add button. | |
field-set-level-chores | Override the validation block (help, errors, warnings) for this field set. |
Events
| Name | Description |
|---|---|
update:modelValue | Emitted when the field value changes. |
Source
client/lib/form/field-set/FieldSetMany.vue