🌐 AI搜索 & 代理 主页
Skip to content

Commit c6a3030

Browse files
authored
docs(b-form-radio): add note that unchecked-value is not submitted via native form submit (closes #4089) (#4090)
1 parent 22581e3 commit c6a3030

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/form-checkbox/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ pre-selected.
209209
When placing individual `<b-form-checkbox>` components within a `<b-form-checkbox-group>`, most
210210
props and the `v-model` are inherited from the `<b-form-checkbox-group>`.
211211

212+
**Note:** the `unchecked-value` prop _does not_ affect the native `<input>`'s `value` attribute,
213+
because browsers don't include unchecked boxes in form submissions. To guarantee that one of two
214+
values is submitted in a native `<form>` submit (e.g. `'yes'` or `'no'`), use radio inputs instead.
215+
This is the same limitation that
216+
[Vue has with native checkbox inputs](https://vuejs.org/v2/guide/forms.html#Checkbox-1).
217+
212218
### Multiple checkboxes and accessibility
213219

214220
When binding multiple checkboxes together, you must set the `name` prop to the same value for all

0 commit comments

Comments
 (0)