--- title: Checkbox true-value/false-value Not Submitted in Forms impact: MEDIUM impactDescription: true-value and false-value attributes don't affect form submission - unchecked boxes send nothing type: capability tags: [vue3, v-model, forms, checkbox, form-submission] --- # Checkbox true-value/false-value Not Submitted in Forms **Impact: MEDIUM** - Vue's `true-value` and `false-value` attributes only affect the JavaScript binding, NOT the actual form submission. Unchecked checkboxes are never included in form submissions by browsers, regardless of `false-value`. This is a browser limitation, not a Vue issue. If you need to submit one of two values (like "yes"/"no" or "active"/"inactive"), use radio buttons instead of a checkbox. ## Task Checklist - [ ] Don't rely on `false-value` for form submissions - it won't be sent - [ ] Use radio buttons when you need to submit one of exactly two values - [ ] Remember `true-value`/`false-value` are for JavaScript state only - [ ] For form submissions with custom values, handle the transformation server-side or in submit handler **Problem - false-value not submitted:** ```html ``` **Solution 1 - Use radio buttons for two-value submission:** ```html ``` **Solution 2 - Handle in submit handler (for SPA/AJAX):** ```html ``` **Solution 3 - Hidden input fallback:** ```html ``` ## Reference - [Vue.js Form Input Bindings - Checkbox](https://vuejs.org/guide/essentials/forms.html#checkbox)