forked from codefellows/seattle-javascript-401d30
-
Notifications
You must be signed in to change notification settings - Fork 0
37 React Forms (JSONForms)
Jagdeep Singh edited this page Jul 3, 2019
·
4 revisions
Forms can be done easily using JSONForms, a declarative framework for efficiently building form-based web UIs.
{
type: 'object',
properties: {
name: {
type: 'string'
},
description: {
type: 'string'
},
done: {
type: 'boolean'
},
rating: {
type: 'integer'
}
},
required: ['name']
}
{
type: 'VerticalLayout',
elements: [
{
type: 'Control',
scope: '#/properties/name'
},
{
type: 'Control',
scope: '#/properties/description',
options: {
multi: true
}
},
{
type: 'Control',
label: 'Rating',
scope: '#/properties/rating'
},
{
type: 'Control',
label: 'Done?',
scope: '#/properties/done'
}
]
}