Turn your JSON to 100% working forms.
via package managers
yarn add toguro
npm i toguro
via a CDN
<link rel="stylesheet" href="https://unpkg.com/toguro/dist/toguro.js"/>
You need to provide a JSON Schema
var schema = {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
},
"age": {
"type": "integer",
"title": "Age",
},
"description": {
"type": "string",
"title": "Description",
}
},
"required": [
"name"
]
}
Instantiate and render
var toguro = new Toguro({
schema: schema,
submit: (formData) => { console.log(formData) }
})
toguro.renderTo(document.getElementById("some-id"))