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.
40 lines • 656 B
JSON
{
"schema": {
"text": {
"type": "string",
"title": "Text"
},
"category": {
"type": "string",
"title": "Category",
"enum": [
"Geography",
"Entertainment",
"History",
"Arts",
"Science",
"Sports"
]
}
},
"form": [
{
"type": "selectfieldset",
"title": "Make a choice",
"items": [
{
"key": "text",
"legend": "Search by text"
},
{
"key": "category",
"legend": "Search by category"
}
]
},
{
"type": "submit",
"title": "Submit"
}
]
}