{
"version": "7.3",
"routing_model": {
"CONSENT_SCREEN": ["SELECTION_SCREEN"],
"SELECTION_SCREEN": ["SURVEY_DETAILS_SCREEN"],
"SURVEY_DETAILS_SCREEN": []
},
"screens": [
{
"id": "CONSENT_SCREEN",
"title": "Before Starting",
"data": {},
"layout": {
"type": "SingleColumnLayout",
"children": [
{ "type": "TextHeading", "text": "YOUR VOICE MATTERS" },
{
"type": "TextBody",
"text": "We are always testing to see where and how things can be improved regarding ELECTRICITY. By particpaiting in this survey, I consent to giving my feedback to my ward councillor MYNARD SLABBERT."
},
{
"type": "Footer",
"label": "Continue",
"on-click-action": {
"name": "navigate",
"next": { "type": "screen", "name": "SELECTION_SCREEN" },
"payload": {}
}
}
]
}
},
{
"id": "SELECTION_SCREEN",
"title": "Answer Questions",
"data": {},
"terminal": true,
"layout": {
"type": "SingleColumnLayout",
"children": [
{
"type": "Form",
"name": "text_input_form",
"children": [
{
"type": "TextBody",
"text": "The Stellenbosch Municipality is better equipped to deal with electricity challenges and should be given more rights to respond to challenges."
},
{
"type": "RadioButtonsGroup",
"name": "question_A",
"label": "Select your option",
"required": true,
"data-source": [
{ "id": "agree", "title": "AGREE" },
{ "id": "disagree", "title": "DISAGREE" }
],
"on-select-action": { "name": "update_data", "payload": {} }
},
{
"type": "TextBody",
"text": "I would like to be entered into a lucky draw for a R500 Woolworths voucher as a thank you for my time to participate in this survey."
},
{
"type": "RadioButtonsGroup",
"name": "question_E",
"label": "Select your option",
"required": true,
"data-source": [
{ "id": "yes", "title": "YES" },
{ "id": "no", "title": "NO THANKS" }
],
"on-select-action": { "name": "update_data", "payload": {} }
},
{
"type": "Switch",
"value": "${form.question_E}",
"cases": {
"no": [
{
"type": "Footer",
"label": "Submit",
"on-click-action": {
"name": "complete",
"payload": {
"question_A": "${form.question_A}",
"question_E": "${form.question_E}"
}
}
}
],
"default": [
{
"type": "Footer",
"label": "Continue",
"on-click-action": {
"name": "navigate",
"next": { "type": "screen", "name": "SURVEY_DETAILS_SCREEN" },
"payload": { "position": "" }
}
}
]
}
}
]
}
]
}
}
]
}