How would I go about using something like this Jquery Slide toggle as a checkbox in a form?
JS Fiddle here
Thanks so much in advance. :)
You could map it to a hidden form element that contains a boolean value, and update that value when the slider is toggled.
Updated fiddle
Here you go, this example show the checkbox: http://jsfiddle.net/skimberk1/TUPG7/
And in this example, it's hidden: http://jsfiddle.net/skimberk1/KNHu7/
The way it works is that it detects if theres a checkbox directly after the toggle, and if there is, it hides it and checks/unchecks it when you slide the toggle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With