Html Formfield
A field for displaying rich HTML content, useful for instructions, formatted information, or custom visual elements within a form.
Properties
| Attribute | Comments |
|---|---|
| basic | |
| name string / required / unique | Field name
This attribute represents the name of the form field. |
| type string / required | Field type
Other attributes might only be available for some field types. Choices:
|
| label string | Field label
A friendly name/label for the field. Note: if not set, the field name is used as label, but not when type is html. Since 6.0.3: Supports placeholders for dynamic labels (e.g., |
| data | |
| expression string | A javascript expression.
By default this javascript is evaluated on the server side and limited to predefined functions (for security). However in combination with tip : use the alias |
| interaction | |
| dependencyFn string added in version 4.0.0 | The dependency logical function
This attribute represents the logical function between multiple dependencies. Choices:
|
| dependencies list / elements=object | Show/hide this field based on the values or other fields
Each dependency element is either an object with the following 2 attributes:
Or with the following 2 attributes:
Use in combination with attribute |
| output | |
| noOutput boolean | Do not output as extravar
Form fields are by default send as extravars. Default: false |
| model string or array | Extravar modelling
By default, a field is sent as a root-extravar. |
| security | |
| noLog boolean added in version 2.2.3 | Disable backend logging
Disables logging in the backend, to hide passwords for example. Default: false |
| validation | |
| required boolean | Required field
Makes the field required. Default: false |
| validIf object added in version 2.2.4 | An field based validation (field must be true)
Enforces a validation where a referencing (expression) field must be true. This field requires an object with 2 attributes:
|
| validIfNot object added in version 2.2.4 | An field based validation (field must be false)
Enforces a validation where a referencing (expression) field must be false. This field requires an object with 2 attributes:
|
| ignoreIncomplete boolean | Allow form submit on non-evaluated placeholders
When an expression-based field has placeholders, Default: false |
| visualization | |
| group string | The field group name
With this attribute you can group fields together. |
| line string added in version 4.0.3 | The field line name
With this attribute you can group fields in a single line together. |
| width string added in version 4.0.3 | The field width
With this attribute you can set the width of a field. Choices:
|
| name string / required / unique | Field name
This attribute represents the name of the form field. |
| type string / required | Field type
Other attributes might only be available for some field types. Choices:
|
| label string | Field label
A friendly name/label for the field. Note: if not set, the field name is used as label, but not when type is html. Since 6.0.3: Supports placeholders for dynamic labels (e.g., |
| group string | The field group name
With this attribute you can group fields together. |
| line string added in version 4.0.3 | The field line name
With this attribute you can group fields in a single line together. |
| width string added in version 4.0.3 | The field width
With this attribute you can set the width of a field. Choices:
|
| dependencyFn string added in version 4.0.0 | The dependency logical function
This attribute represents the logical function between multiple dependencies. Choices:
|
| dependencies list / elements=object | Show/hide this field based on the values or other fields
Each dependency element is either an object with the following 2 attributes:
Or with the following 2 attributes:
Use in combination with attribute |
| noLog boolean added in version 2.2.3 | Disable backend logging
Disables logging in the backend, to hide passwords for example. Default: false |
| required boolean | Required field
Makes the field required. Default: false |
| validIf object added in version 2.2.4 | An field based validation (field must be true)
Enforces a validation where a referencing (expression) field must be true. This field requires an object with 2 attributes:
|
| validIfNot object added in version 2.2.4 | An field based validation (field must be false)
Enforces a validation where a referencing (expression) field must be false. This field requires an object with 2 attributes:
|
| ignoreIncomplete boolean | Allow form submit on non-evaluated placeholders
When an expression-based field has placeholders, Default: false |
| noOutput boolean | Do not output as extravar
Form fields are by default send as extravars. Default: false |
| model string or array | Extravar modelling
By default, a field is sent as a root-extravar. |
| expression string | A javascript expression.
By default this javascript is evaluated on the server side and limited to predefined functions (for security). However in combination with tip : use the alias |
Examples
Alert
- type: html
name: alert
expression: |
'<div class="alert alert-danger" role="alert">
danger mister robinson !
</div>'
- type: html
name: image
expression: |
'<img src="https://dummyimage.com/16:9x1080" />'
- name: header
type: html
expression: |
'<h3 class="title is-3">Your own title</h3>'