src/collections/Form/Form.js
A form.
Render a field containing a label and form control. All form control components are available.
Render a field containing a label and custom form control. Use any component from any library, or your own.
You can define a label with props object.
You can define a label by passing your own element.
The field control prop also works with HTML tags.
Adding an id to a shorthand Form.Field adds a matching htmlFor prop to the label. In case of an error, the aria-describedby prop is used to connect the error label to the form field.
Adding an id to a Form subcomponent adds a matching htmlFor prop to the label.
A field is a form element containing a label and an input.
If a form is in loading state, it will automatically show a loading indicator.
If a form is in an success state, it will automatically show any success message blocks.
If a form is in an error state, it will automatically show any error message blocks.
If a form is in warning state, it will automatically show any warning message block.
Individual fields may display an error state.
Individual fields may be disabled.
Individual fields may be read only.
A form can vary in size.
A form on a dark background may have to invert its color scheme.
A form can prevent itself from stacking on mobile.
A field can have its label next to instead of above it.
A field can specify its width in grid columns.
A field can show that input is mandatory.
Form.Field shorthand can also be required.
Fields can have their widths divided evenly.
Multiple fields may be inline in a row.
A form group can prevent itself from stacking on mobile, too.
You can capture form data on change or on submit.
You can clear form values on submit.