Question types:
A question consists of question types. These types describe how a question should be rendered. The description is done in JSON format and is contained in the "Json" column of the QuestionType table.
Here the basic json format:
[
{
"inputTemplate": "TEMPLATE WITH PLACEHOLDER {VARIABLE_NAME}"
"inputs": [
{
"type": "TYPE",
"variable": "VARIABLE_NAME",
}
]
}
] |
Currently the following input types are supported:
| Type | Example | Ausgabe |
|---|
| number | [ { "inputTemplate": "Soll: {targetPreasure} bar", "inputs": [ { "type": "number", "variable": "targetPreasure" } ] } ] | |
| text | [ { "inputTemplate": "Bezeichnung: {description}", "inputs": [ { "type": "text", "variable": "description" } ] } ] | |
| radio | [ { "inputTemplate": "", "inputs": [ { "type": "radio", "label": "Ja", "value": true, "variable": "result" }, { "type": "radio", "label": "Nein", "value": false, "variable": "result" } ] } ] | |
| checkbox | [ { "inputTemplate": "", "inputs": [ { "type": "checkbox", "label": "Druckprüfung", "variable": "result1" }, { "type": "checkbox", "label": "Temperaturprüfung", "variable": "result2" } ] } ] | |
| date | [ { "id": "druck", "inputTemplate": "", "inputs": [ { "type": "date", "label": "Druckprüfung", "variable": "result" } ] } ] | |
| range | [ { "id": "druck", "inputTemplate": "Druck: {druck}", "inputs": [ { "type": "range", "variable": "druck", "min": 10, "max": 350 } ] } ] | |
| textarea | [ { "inputTemplate": "Beschreibung", "inputs": [ { "type": "textarea", "variable": "result" } ] } ] | |
| picture | [ { "inputTemplate": "Foto", "inputs": [ { "type": "picture", "variable": "photo" } ] } ] | |