question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Checkbox value "on"

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
JosephusPayecommented, Aug 11, 2016

Now available in v0.8.9, see the UiCheckbox docs.

1reaction
JosephusPayecommented, Jul 12, 2016

As implemented in https://github.com/JosephusPaye/Keen-UI/commit/aa13404a95840828234099a6dd09aa998f551fcb, you can set value to the string "true" or "false" and those will be submitted. This also allows for binding multiple checkboxes.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found