Skip to content

FormModel

Overview

This component is a form model that renders fields based on the configuration for the model.

Theme entry: FormModel

Props

NameTypeRequiredDefaultDescription
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
appstringyesDjango app label that owns the model.
modelstringyesDjango model name to render a form for.
viewstringundefinedView identifier used to select view-specific form configuration; uses the default configuration when omitted.
fieldsarrayundefinedField names to render; overrides the configuration default for this view.
expandarrayundefinedField names to render in expanded (inline) mode.
variantstring"default"Visual variant passed to the theme system to select an alternate form style.
fieldComponentsobjectundefinedMap of field paths to async functions returning an override field component.
fieldPropsobjectundefinedMap of field paths to additional props passed to the field component.
fieldDetailsobjectundefinedMap of field paths to field detail overrides merged with server configuration.
expandDetailsobjectundefinedMap of expand field paths to detail overrides.
widgetComponentsobjectundefinedMap of field paths to async functions returning an override widget component.
widgetPropsobjectundefinedMap of field paths to additional props passed to the widget component.

Slots

before-fields

Scoped slot.

Bindings

NameDescription
form-attrs
form-props

form-level-chores

Slot.

fields

Scoped slot.

Bindings

NameDescription
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

NameDescription
form-attrs
form-props

Source

client/lib/form/form-model/FormModel.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2