I am using the Bootstrap Switch library but after writing the following code, I'm able to pass only the 'True/Yes/on' value to the backend. The other state is not being passed at all.
HTML:
<input type="checkbox" name="anonymous" checked>
JavaScript:
<script>
$("[name='anonymous']").bootstrapSwitch({
state:false,
size:'mini',
onText:'Yes',
offText:'No',
offColor:'primary',
onColor:'danger'
});
</script>
What am I missing or doing wrong?