Checkbox value "on"
See original GitHub issueI noticed that the submitted value for a checked checkbox is "on", while the synced value of the model is true. Is there a way to have the checkbox submit true instead?
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
<input type="checkbox"> - HTML: HyperText Markup Language
Note: Unlike other input controls, a checkbox's value is only included in the submitted data if the checkbox is currently checked . If...
Read more >form submit checkbox sets value to "on" rather than "true"
A checked checkbox simply sends its value attribute. An unchecked checkbox doesn't send itself in the form.
Read more >HTML DOM Input Checkbox value Property - W3Schools
The value property sets or returns the value of the value attribute of a checkbox. For checkboxes, the contents of the value property...
Read more >HTML | DOM Input Checkbox value Property - GeeksforGeeks
The Input Checkbox Value property in HTML DOM is used to set or return the value of the value attribute of an input...
Read more >How to get checkbox value in form submission
In case you want a definite value for each input on the server-side is to use hidden fields along with checkbox. Both fields...
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 Free
Top 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

Now available in v0.8.9, see the UiCheckbox docs.
As implemented in https://github.com/JosephusPaye/Keen-UI/commit/aa13404a95840828234099a6dd09aa998f551fcb, you can set
valueto the string"true"or"false"and those will be submitted. This also allows for binding multiple checkboxes.