CheckBox with Form was not work
See original GitHub issueVersion
2.12.8
Environment
ubuntu14.04, react15.6.1
Reproduction link
Steps to reproduce
I’m first use <Checkbox>
component to complete , and then use the <Form>
component nested in the outer layer.
that will show me a error:
`getFieldDecorator` will override `value`, so please don't set `value` directly and use `setFieldsValue` to set it.
Then i tyr put <CheckboxGroup>
value
to <FormItem>
initialValue
, it’s ok.
But next, i try to click some checkbox value,and then to click the check all
checkbox, it;s not work.
What is expected?
can be work well
What is actually happening?
It’s work well when first click, but after to click some checkbox value, again to click check all
is not work
After ckick some checkbox, try to click all check
is not work
I try to remove <Form>
component, only one <CheckBox>
component to work, it’s work well.
so, i think that issue because of <Form>
and <CheckBox>
or my code issue?
ps: my english is too bad, sorry to bother you
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Checkboxes not working - Stack Overflow
I'm trying to create a checklist but only the first checkbox is working. When I click on the other ones it checks the...
Read more >Solved: HubSpot Community - Checkbox on form not working
Hello,. I have a checkbox on a form asking contacts if they are an employee of an certain organization or not, so obviously...
Read more ><input type="checkbox"> - HTML: HyperText Markup Language
A checkbox allows you to select single values for submission in a form (or not). Try it. HTML Demo: <input type="checkbox">. Reset.
Read more >Checkboxes not working in WPforms form | WordPress.org
Hello,. I'd like some help with my WPforms form on the page. It does not show the 'check' symbol when you click one...
Read more >Form Checkbox | Components - BootstrapVue
For cross browser consistency, <b-form-checkbox-group> and ... Only basic/native HTML is supported in the html field (components will not work).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran in to similar problem, when i was trying to send form with selected checkbox, because function validateFields expect to get value from field, but checkbox returned “checked”, solution to my problem was set in the fieldDecorator valuePropName as ‘checked’ like this.
I think the correct solution for setting initialValue for checkboxes is the following: You have to set two options: