2

http://www.bootstrap-switch.org/examples.html

I'm using the Indeterminate switch (which keeps the checkbox between true and false). The issue is that the switch defaults to true.

Basically I want that field to submit as nil unless user specifically selects true or false.

Jackson Cunningham
  • 4,973
  • 3
  • 30
  • 80

1 Answers1

0

Jackson Is this all you need?
Same use for Toggles.

<label>
      <input type="checkbox" checked> Checked
</label>
<br><br>
<label>
      <input type="checkbox" unchecked> unChecked
</label>   
AngularJR
  • 2,752
  • 2
  • 16
  • 19
  • Hi @AngularJR - I want my checkboxes to start with a null value until they are specifically checked or unchecked by the user. – Jackson Cunningham Jun 19 '15 at 00:40
  • Hi there, Sorry I thought you just wanted to default it to false.There was another answer here just before which was to try `data-indeterminate="true"` but I don't think that is going to fly for what you want here. Try searching to see if the answer is out there. – AngularJR Jun 19 '15 at 01:39
  • Have a look at this [**link here**](https://css-tricks.com/indeterminate-checkboxes/) And also [**here**](http://stackoverflow.com/questions/1726096/tri-state-check-box-in-html) – AngularJR Jun 19 '15 at 02:14
  • I ended up just using a dropdown with a prompt – Jackson Cunningham Jun 23 '15 at 00:04