FormModel
Overview
This component is a form model that renders fields based on the configuration for the model.
Theme entry: FormModel
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| 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. | |
| app | string | yes | Django app label that owns the model. | |
| model | string | yes | Django model name to render a form for. | |
| view | string | undefined | View identifier used to select view-specific form configuration; uses the default configuration when omitted. | |
| fields | array | undefined | Field names to render; overrides the configuration default for this view. | |
| expand | array | undefined | Field names to render in expanded (inline) mode. | |
| variant | string | "default" | Visual variant passed to the theme system to select an alternate form style. | |
| fieldComponents | object | undefined | Map of field paths to async functions returning an override field component. | |
| fieldProps | object | undefined | Map of field paths to additional props passed to the field component. | |
| fieldDetails | object | undefined | Map of field paths to field detail overrides merged with server configuration. | |
| expandDetails | object | undefined | Map of expand field paths to detail overrides. | |
| widgetComponents | object | undefined | Map of field paths to async functions returning an override widget component. | |
| widgetProps | object | undefined | Map of field paths to additional props passed to the widget component. |
Slots
before-fields
Scoped slot.
Bindings
| Name | Description |
|---|---|
| form-attrs | |
| form-props |
form-level-chores
Slot.
fields
Scoped slot.
Bindings
| Name | Description |
|---|---|
| all-widget-props | |
| field-components | |
| field-details | |
| field-names | |
| field-props | |
| form-attrs | |
| form-model | |
| form-props | |
| theme | |
| widget-components |
after-fields
Scoped slot.
Bindings
| Name | Description |
|---|---|
| form-attrs | |
| form-props |
Source
client/lib/form/form-model/FormModel.vue