AdditionalForm
AdditionalForm (additionalForm) (1.2.2) (BETA)
This field allows you to dynamically load additional dynamic forms!
Example:
{
"size": "s12 m12",
"type": "additionalForm",
"id": "additionalForm",
"hidden": false,
"value": "",
"form_position": null,
"additional_fields": null,
"api_add_lang": false,
"api_watcher": {
"delay_api": "",
"fields": [
{
"field_id": "additionalFormName",
"api": "/static/FORMS/API/additionalForms/additionalForm[${value}].json"
}
]
}
}
Field requires 2 configuration options:
additional_fields
{
"form_position": 9,
"additional_fields":
[
{
"size": "s12 m12",
"type": "text",
"id": "additional_nazwaOperacji",
"label": "Nazwa operacji",
"icon": "person",
"validate": [
"required"
],
"hidden": false,
"value": ""
},
{
"size": "s12 m12",
"type": "text",
"id": "additional_opisProblemu",
"label": "Opis problemu",
"icon": "subject",
"validate": [
"required"
],
"hidden": false,
"value": ""
},
{
"size": "s12 m12",
"type": "file",
"id": "fileField",
"label": "Załącznik",
"validate": [
""
],
"icon": "attach_file",
"placeholder": "Załącznik...",
"hidden": false
},
{
"size": "s12 m12",
"type": "file",
"id": "fileField",
"label": "Załącznik",
"validate": [
""
],
"icon": "attach_file",
"placeholder": "Załącznik...",
"hidden": false
},
{
"size": "s12 m12",
"type": "file",
"id": "fileField",
"label": "Załącznik",
"validate": [
""
],
"icon": "attach_file",
"placeholder": "Załącznik...",
"hidden": false
}
]
}
form_position
index from which new fields are to be added
The "additional_form" mechanism is still in beta, so determining the order of the form may seem difficult.
...TODO...
Use cases:
For example, if any selection is to load an additional form from another file, we can use api_watcher and the additionalForm field.
Dynamically loaded forms currently do not support API dependencies.
The rest of the available parameters:
This field supports all parameters with "Attributes available for each field".