-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support checkboxes #27
Comments
@ezhlobo with a checkbox onChange, you can access the for example if your field name in formous is <input
type="checkbox"
checked={this.props.fields.rememberMe.value}
onChange={(event) => {
this.props.fields.rememberMe.events.onChange({
target: { value: event.target.checked }
});
}}
>
Remember me
</input> and you could pull it to some helper function: function onCheckedHandler(field) {
return function(event) {
field.events.onChange({
target: { value: event.target.checked }
});
};
}
// and using it
<input
type="checkbox"
checked={this.props.fields.rememberMe.value}
onChange={onCheckedHandler(this.props.fields.rememberMe)}
>
Remember me
</input> |
@ezhlobo I realize support for checkboxes and radios is not great.. or even present. We're on a temporary code freeze for now, but it'll get addressed during the rewrite. |
Hi! I have a problem with setting up checkboxes inside formous. What's the best way to do it?
Now I have to do something like this:
I guess checkboxes aren't supported by formous, are they?
The text was updated successfully, but these errors were encountered: