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.
32 lines • 760 B
JSON
{
"schema": {
"shortmood": {
"type": "string",
"title": "Mood of the day",
"description": "Describe how you feel in short",
"default": "happy",
"required": true
},
"longmood": {
"type": "string",
"title": "Mood of the day",
"description": "Describe how you feel with a rather long adjective-like series of words"
}
},
"form": [
"shortmood",
{
"key": "longmood",
"prepend": "I feel",
"append": "today",
"notitle": true,
"htmlClass": "usermood",
"htmlMetaData":{
"style":"border: 1px solid blue",
"data-title":"Mood"
},
"fieldHtmlClass": "input-xxlarge",
"placeholder": "incredibly and admirably great"
}
]
}