Isn’t there no way to have a tri-state check button in HTML (yes, no, null)?
Are there any simple tricks or workarounds that may be used instead of having to render the entire thing from scratch?
Asked by Pekka
I found a better way thanks to Janus Troelsen’s comment:
See the W3C reference guide for more information. Set the checkbox to true to make it look visually indeterminate:
element.indeterminate = true;
Janus Troelsen’s fiddle is shown here. However, keep in mind the following:
Answered by pau.moreno
On input elements, you might use HTML’s indeterminate IDL attribute.
Answered by Ms2ger
My suggestion is to make use of
See examples at:
Answered by Wolfgang Fahl
You can get this feature by using radio groups:
<input type="radio" name="choice" value="yes" />Yes <input type="radio" name="choice" value="No" />No <input type="radio" name="choice" value="null" />null
Answered by Franz
Indeterminate states can be used: http://css-tricks.com/indeterminate-checkboxes/. Browsers support it out of the box, and it doesn’t require any other js libraries.
Answered by altso
Post is based on https://stackoverflow.com/questions/1726096/tri-state-check-box-in-html