Closed
Description
Describe the bug
By default a checkbox is only submitted in the form when its checked and then it sends the given value. I expected the unchecked-value
setting to then dynamically the value but always send the checkbox as if it as checked.
Steps to reproduce the bug
<b-form-checkbox
v-else
switch
v-model="checked"
value="1"
unchecked-value="0"
name="mycheckbox"
>
foo
</b-form-checkbox>
Expected behavior
mycheckbox
is either 0 (unchecked) or 1 (checked) after submission
Actual behavior
mycheckbox
is 1 (checked) after submission or not set at all (unchecked)
Versions
Libraries:
- BootstrapVue: 2.0.0
- Bootstrap: 4.3.1
- Vue: 2.6.10
Environment:
- Device: Laptop
- OS: Linux
- Browser: Brave
- Version: [e.g. 70]
Demo link
Additional context
Add any other context about the bug here.
Metadata
Metadata
Assignees
Labels
No labels