Skip to content

BaseFormGroups

Props

Prop nameDescriptionTypeValuesDefault
formFieldJsonthe json object containing all the field information incl. x-attrs custom field
for placeholder, field type, etc. For more information on the attributes see
BaseForm.
Most importantly the x-attrs needs to include the field form_group assigning
a number (1-based index!) to each form field by which fields are grouped.
Optional: add an attribute form_group_title to any group field (the field with the
lowest order takes precedent) to add a form group header.
object-
modelValuethe values for each field if any already presentobject-{}
languageset current languagestring-'en'
availableLocalesprovide information about all available languagesarray-[]
formIdan id for field groups to still have unique field idsstring-''
formStyledefine additional style for the form
should be an object eg. { 'padding-top': 0 }.
note: this applies to BaseForm not the wrapper
component
object-{}
fieldsWithTabsdefine fields (specify field name!) for which tabs should be shownarray-[]
fieldIsLoadingenter the field name of a field that is currently fetching autocomplete
results
string-''
dropDownListsprovide an object that contains the options list for all
fields with autocomplete / chips input
object-{}
showErrorIcondefine if error icon should be shown.
for an example on how it looks on an individual form field see BaseInput
boolean-false
errorMessagesObjectprovide all error messages for fields in a separate object
same structure as modelValue, final value should be an array
of messages

example - error in repeatable field group, only the second group has an error:
{ [fieldGroupName]: [{}, { amount: ['This field is required.'] }]}

caveat: if error messages are provided via errorMessagesObject, they take
priority over fieldProps set values
object-{}
clearableif true a remove icon will be shown allowing to remove
all input at once.
for an example on how it looks on an individual form field see BaseInput
boolean-false
fieldPropsprovide an object with settings and properties for each field. This takes an object
with the field name as properties with the props nested.
{ fieldName1: { required: false, ... }, fieldName2: { ... } }.

find the possible variables at the respective input components:
BaseInput
BaseAutocompleteInput
BaseMultilineTextInput
BaseChipsInput
BaseChipsBelow
BaseDateInput
BaseToggle
object-{}

Events

Event namePropertiesDescription
fetch-autocomplete
input-complete
update:model-value
form-mounted

Slots

NameDescriptionBindings
label-additionSlot to allow for additional elements on the right side of the label row <div> (e.g. language tabs))field-name string - in order to use slot for only one field use a if condition with the form field name (the object property)

index number - in case field is repeatable the index of the field
pre-input-fieldslot to add elements within the form field but in a row before the actual input field. For an example see BaseInput.field-name string - in order to use slot for only one field use a if condition with the form field name (the object property)

index number - in case field is repeatable the index of the field
input-field-addition-beforeSlot to allow for additional elements in the input field <div> (before <input>).field-name string - in order to use slot for only one field use a if condition with the form field name (the object property)

index number - in case field is repeatable the index of the field
input-field-inline-beforeto add elements directly inline before the input (contrary to input-field-addition-before this does not wrap. For an example see BaseInput.field-name string - in order to use slot for only one field use a if condition with the form field name (the object property)

index number - in case field is repeatable the index of the field
input-field-addition-afterfor adding elements after inputfield-name string - in order to use slot for only one field use a if condition with the form field name (the object property)

index number - in case field is repeatable the index of the field
post-input-fieldfor adding elements at the end covering the whole heightfield-name string - in order to use slot for only one field use a if condition with the form field name (the object property)

index number - in case field is repeatable the index of the field
error-iconuse a custom icon instead of standard error/warning icon
remove-iconuse a custom icon instead of standard remove icon
below-inputbelow-input slot added to e.g. add drop downfield-name string - in order to use slot for only one field use a if condition with the form field name (the object property)

index number - in case field is repeatable the index of the field

Demo

This component acts as a wrapper around BaseForm, so the form fields can be grouped into visually distinct forms without this being reflected in the field information of the OpenAPI definition by simply adding an x-attrs field form_group with an order number as value.

The events and slots (and mostly also props) of this component are identical to BaseForm.

Below is a basic example (the form input fields are not fully functional) to demonstrate the layout.