Suche
Table of Contents

1. Summary

This command lets you create a multi form page from a JSON-Template, which the user has to fill out to continue.

2. Examples

CreateFormFromTemplateSCR
Figure 1. The Command

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. For example:

[
  {
    "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"
  }
]
CreateFormFromTemplate1 1
Example 1. The created form

In general the form will be created corresponding to the following pattern: [{Form Field 1},{Form Field 2},…​]

Describing one form field after another, setting all the parameters by naming the key and the corresponding value.
The form needs to at least contain one Form Field for the command to work.

The possible parameters (JSON-keys) for a form field are:

Name of Data Purpose

label

This is the name of the input

dataType

This is the data type of the input field. Possible types are: text ,number, boolean, date, textarea, select[option1,option2,…​]

fieldID

This is the key of this form field when it gets saved in a JSON object

initialValue

The prefilled value of this form field when opening the form

mandatoryField

This classifies if this form field needs to be filled out to continue