-
Notifications
You must be signed in to change notification settings - Fork 92
Component Properties
The following props can be set on the form components:
In addition, you can pass any Formsy.Mixin property. At the least, components require a name
.
Other props are passed through and applied to the form control, React will render these according to it’s HTML attribute whitelist. For example a placeholder
property passed to the component would be applied to the form control within the component.
- Type:
React.PropTypes.bool
- Default:
false
Disables this form component. For components that allow selecting multiple values (<RadioGroup>
, <CheckboxGroup>
, <Select>
), it is possible to disable individual elements within that control. See the documentation for individual components for details.
Alternatively you may disable all form elements by setting the disabled
prop on the parent form. See Formsy.Mixin isFormDisabled.
- Type:
React.PropTypes.string
Text to render for the help text, typically displayed underneath the form control. See Bootstrap forms: help text.
- Type:
React.PropTypes.node
Content rendered within the label tag of the component.
- Type:
React.PropTypes.oneOf('horizontal', 'vertical', 'elementOnly')
- Default:
'horizontal'
Use one of the bundled layouts.
- Type:
React.PropTypes.func
If supplied, callback signature is (name, value) where name
is the name of the element, and value
is it’s changed value.
- Type:
React.PropTypes.bool
- Default:
false
Whether to present validation notices on pristine elements.
- Type:
React.PropTypes.bool
- Default:
false
When true
, validation notices are hidden until the user attempts to submit the form.