PAK Commands – Create Form From Template
1. Summary
This command lets you create a multi form page which the user has to fill out to continue.
2. Examples
Due to simplicity, the descriptiveText
input parameter will be left empty for the examples. By default, it is set to „Please fill out the form below to continue“.
The jsonTemplate
input field takes a json form template creating the form, e.g:
[
{
"label": "First Name",
"dataType": "text",
"fieldId": "firstName",
"initialValue": "John",
"mandatoryField": "true"
},
{
"label": "Last Name",
"dataType": "text",
"fieldId": "lastName",
"mandatoryField": "true"
},
{
"label": "Age",
"dataType": "Number",
"fieldId": "age"
}
]
In general the Form will be created in following pattern:
[{Form Field 1},{Form Field 2},…]
The Form needs to at least contain 1 Form Field.
A Form Field is generated by following Data:
Name of Data | What it is needed for |
---|---|
|
This is the name of the input |
|
This is the Data Type of the input field, e.g. |
|
This is the key of this form field when it gets saved in a JSON object |
|
This the prefilled value of this form field when opening the Form |
|
This classifies if this form field needs to be filled out to continue |