Note the use of the important props value, onChange and label which are
provided by the form builder. Other props such as help are passed through from
the <Field /> proxy components used above.
Overriding the default field component
// as long as a component takes a `value` prop (and ideally a `label` prop)// and an `onChange` callback prop, it can be used as a react-form-for fieldvar Input = require('react-bootstrap/Input')var {Form, Fields, Field} = require('react-form-for')var ExampleForm = React.createClass({ handleChange: function(updatedValue) { this.setState({value: updatedValue}) }, // the checkbox Field gets an Input component with different layout classes getCheckboxComponent: function() { return ( <Input type="checkbox" wrapperClassName="col-xs-offset-2 col-xs-10"/> ) }, render
Warning
:warning: This module is pretty new and might have some bugs, please file an issue
if you encounter any problems.