jsonform
Version:
Client-side JavaScript library that generates HTML forms from structured data models expressed using a JSON schema, possibly completed by a form layout description.
30 lines • 571 B
JSON
{
"schema": {
"menu": {
"type": "array",
"title": "Options",
"items": {
"type": "string",
"title": "Option",
"enum": [
"starter",
"maincourse",
"cheese",
"dessert"
]
}
}
},
"form": [
{
"key": "menu",
"type": "checkboxes",
"titleMap": {
"starter": "Starter would be great",
"maincourse": "No way I'll skip the main course",
"cheese": "Cheddar rules!",
"dessert": "Thumbs up for a dessert"
}
}
]
}