Configuration

Last updated:

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

This page therefore focuses on the SDK syntax, the behaviour of mount() and the SDK-specific options.

Target element

The first parameter for mount() is the target element.

The following are supported:

  1. A CSS selector string, for example '#my-form'
  2. A genuine HTMLElement

The target element must be present in the browser DOM, if mount() is called.

Identification and form source

The common semantics for these fields are described in Formcentric Client General.

In the SDK, the corresponding keys are as follows:

SDK-Key
embedId
formDefinition
srcUrl
dataUrl
formappUrl
designUrl

Theme and asset configuration

The common semantics for these fields are described in Formcentric Client General.

In the SDK, the corresponding keys are as follows:

SDK-Key
themeUrl
themeVariableUrl
themeVariables
templateUrl
themeDir
theme
skipThemeLoad
skipTemplatesLoad
skipFormLoad

Default values, request context and metadata

The common semantics for these fields are described in Formcentric Client General.

In the SDK, the corresponding keys are as follows:

SDK-Key
vars
params
refs
token
requestHeaders
formName
instanceId
contentHandler
env
configuration

Language, local and translations

The common semantics of language, locale and translations are described in Formcentric Client General.

In the SDK, the corresponding keys are language, locale and localesPath.

Example:


The common semantics of maxWidth, height and debug are described in Formcentric Client General.

Example:


Parent URL/double opt-in

The technical semantics of parentUrl are described in Formcentric Client General. In the SDK, the same common key is used directly as parentUrl.

Example:


If parentUrl is not set explicitly, the current page URL is used as a user return context.

Full MountConfig reference

The SDK supports the following mount configuration fields:


Important behavioural rules and defaults

    At least one of embedId or formDefinition must be set.

    SDK integrations are config-authoritative. data-fc-* attributes on the target element are not used as a live configuration source.

    Most fields are initialisation-only props. Changes afterwards are not automatically applied to a running instance.

    The default value for conflictBehavior with direct SDK mounts is 'throw'.

    If a handover for the same embedId is required, then conflictBehavior: 'stop-existing' should be set.

    Note that skipThemeLoad and skipTemplatesLoad take effect only if they are set explicitly.

    Object-based configurations like vars, params, themeVariables and configuration should be passed as serialisable objects.

    data-fc-watch is Static-only and is ignored for SDK mounts.

Feedback