@s-ui/react-form-builder
v5.20.0
Published
> Description
Downloads
7,764
Maintainers
Keywords
Readme
FormBuilder
Description
Documentation: https://docs.mpi-internal.com/scmspain/all--lib-form-builder-docs/
Playground: https://form-builder-workbench.surge.sh/
Installation
$ npm install @s-ui/react-form-builder --save
Usage
Basic usage
import FormBuilder from '@s-ui/react-form-builder'
return <FormBuilder />
Find full description and more examples in the demo page.
Update Fields Value Programatically
To update a field programatically you can return an object from the async onChange callback, and the key values inside the object will trigger a change in the field.
In this example we are chaning the value of the field color
to yellow
allways.
const onChange = fields => {
...
return Promise.resolve({
color: 'yellow'
})
}
<FormBuilder
...
onChange={onChange}
/>