Configuration

Last updated:

Configuration in Vue makes use of props on FormcentricForm.

The technical semantics of the common Formcentric keys are described in the main Formcentric Client (General) documentation.

This page therefore focuses on the Vue syntax and Vue-specific special cases.

Sizes and layout

The common semantics of height and maxWidth are described in Formcentric Client (General). In Vue, these values can be set directly as props or via containerProps on the wrapper.

Example with props:


Example with normal Vue attributes:


Example with containerProps:


Parent URL/double opt-in

The technical semantics of parentUrl are described in Formcentric Client (General).

In Vue, the same common key is set directly as the prop parentUrl – such as when the form finds itself in a modal, for example.

Example:


Preconfiguring forms with dynamic values

The technical semantics of vars and the common behaviour with URL parameters are described in Formcentric Client (General).
In Vue, the common key is set directly as the prop vars.

Example:


Language and locale

The common semantics of language and locale are described in Formcentric Client (General). In Vue, the same keys are set directly as props.

Example:


Including your own translations

The common semantics of localesPath and the structure of the translation file are described in Formcentric Client (General). In Vue, the same common key is set directly as the prop localesPath.

Example:


Example for a localisation file:


Configuring a captcha provider

The common semantics of configuration are described in Formcentric Client (General). In Vue, the same common key is set directly as the prop configuration.

Example:


Form name and other metadata

The common semantics of formName, refs, requestHeaders, persist and other metadata are described in Formcentric Client (General). In Vue, these common keys are set directly as props.

Example:


Full props reference and event reference

The FormcentricForm component supports all mount configuration values as top-level props, as well as Vue-specific additional props and events.

Vue-specific props and wrapper attributes

  1. remountKey?: string | number
    Forces a full re-initialisation of the form. This prop should be used if init-time props change at runtime.
  2. containerProps?: Record<string, unknown> Passes attributes to the enclosing <div>, for example class, style, id, role, aria-* or other attributes.
  3. Normal Vue attributes on <FormcentricForm> Attributes like class, style, id or aria-* are also applied to the enclosing <div>.

Events

  1. @ready Is triggered after a successful initialisation.
  2. @error Is triggered after initialisation or runtime errors. The event returns an Error object.

Instance/conflict behaviour

  1. conflictBehavior?: 'throw' | 'stop-existing'
    Specifies the application behaviour if the same embedId is already active on another/the same DOM instance.
    In the Vue wrapper, stop-existing is active by default.

Identification and form source

The technical semantics of the common props are described in Formcentric Client (General).

In Vue, these are as follows:

Prop
embedId
formDefinition
srcUrl
dataUrl
formappUrl
designUrl

Theme and asset configuration

The technical semantics of the common props are described in Formcentric Client (General).

In Vue, these are as follows:

Prop
designUrl
themeUrl
themeVariableUrl
themeVariables
templateUrl
themeDir
theme
skipThemeLoad
skipTemplatesLoad
skipFormLoad

Default values, request context and metadata

The technical semantics of the common props are described in Formcentric Client General.

In Vue, these are as follows:

Prop
vars
params
refs
token
requestHeaders
formName
instanceId
contentHandler
env
parentUrl
configuration

Internationalisation, layout and debugging

The technical semantics of the common props are described in Formcentric Client (General).

In Vue, these are as follows:

Prop
language
locale
localesPath
debug
maxWidth
height

Important behavioural rules and defaults

  1. At least one of embedId or formDefinition must be set.
  2. Most configuration props are initialisation-only props. Changes afterwards are not automatically applied to a running instance.
  3. Changes to embedId, formDefinition or remountKey trigger a repeat embedding.
  4. Changes to provideFormcentricConfig(...) values or browser-global defaults also take effect only after a repeat embedding.
  5. Attributes of the wrapper element like class, style, id, aria-* or containerProps affect the enclosing <div> and not the running Formcentric instance itself.
  6. In the Vue wrapper, conflictBehavior is set to stop-existing by default.
  7. Note that skipThemeLoad and skipTemplatesLoad take effect only if they are set explicitly.
  8. If you are intending to reuse the same form, then embedId should remain stable.
  9. To force re-initialisation, make use of remountKey instead of using a changing Vue key.
  10. Object-based props like vars, params, themeVariables, configuration or containerProps should be passed as serialisable objects.
  11. The Static attribute data-fc-watch is not relevant for component-based Vue embeddings.

Feedback