Creating Dynamic Forms Field


Creating a new Dynamic Forms Field

Navigate to the Administration > Dynamic Forms Field or search for Dyamic Form Field in the Administration menu.

Dynamic Forms Field

If you cannot find the Dynamic Forms Fields option, verify that you have the /admin/dynamic-forms/fields permission active.

Select +Add New and input the required information: Dynamic Forms Fields

Add New

Name: A unique identifier for this field. Should not contain white spaces. This will be used during the dynamic form creation for identify the current field. Enabled: Dynamic form field is currently enabled Disabled: Dynamic form field is currently disabled Definition: The schema definition used for render this field in a dynamic form.

Dynamic form field fill

Fill in the label translations for the available languages configured in the account.

Enums Translations

Fill the enums values translations for the available languages.

Enums Translations

In order to properly check and process the definition the Process definition button should be clicked. A new section to fill multilang values will be available if you add enum property to the definition

Examples of schema definition

Text field:
{
    "type": "string"
}
Field of type list (select)
{
    "type": "string",
    "enum": [
        "opt1",
        "opt2"
    ]
}
Date field
{
    "type": "string",
    "format": "date-time",
    "x-btrz-date": {
        "from": "new Date()"
    }
}
List type field but getting the data from a collection
{
    "type": "string",
    "x-btrz-data": {
        "collection": "document_types",
        "key": "_id",
        "value": "lexiconKeys.name",
        "ord": "ord",
        "default": ""
    }
}

Where collection can be: “countries”, “document_types”, etc.

Click Save to save your changes.