angular2-json-schema-form
Version:
Angular 2 JSON Schema Form builder
43 lines (42 loc) • 856 B
JSON
{
"schema": {
"response": {
"type": "string",
"title": "Search"
}
},
"form": [ {
"type": "questions",
"key": "response",
"title": "Let's check your mood",
"items": [ {
"type": "question",
"title": "Are you happy?",
"activeClass": "btn-success",
"optionsType": "radiobuttons",
"options": [ {
"title": "Yes",
"value": "happy",
"next": "q2",
"htmlClass": "btn-primary"
}, {
"title": "No",
"value": "sad",
"submit": true
} ]
}, {
"type": "question",
"qid": "q2",
"title": "Really happy?",
"options": [ {
"title": "Yes",
"value": "reallyhappy",
"submit": true
}, {
"title": "No",
"value": "happy",
"submit": true
} ]
} ]
} ]
}