diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index e18011b75..4cb2f2718 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -13,6 +13,7 @@ - **Modal** - Increased `close` specificity, modal will now only close on `> .close` #2736 **Additional Bugs** +- **Form Validation** - Fixed issue with `get value(s)` where unchecked checkboxes would not correctly retrieve values - **Input** - `labeled input` now keeps border on label edge so that focus color appears correctly - **Input** - Input now will reset `font-weight` and `font-style` if set on parent; - **Menu** - Added `flex: 0 0 auto` to menu item to make sure menu do not collapse text content to reduce space diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index e19bcab85..43594ef19 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -455,11 +455,10 @@ $.fn.form = function(parameters) { } if(isCheckbox) { if(isChecked) { - values[name].push(value); + values[name].push(true); } else { - module.debug('Omitted unchecked checkbox', $field); - return true; + values[name].push(false); } } else { @@ -477,8 +476,7 @@ $.fn.form = function(parameters) { values[name] = true; } else { - module.debug('Omitted unchecked checkbox', $field); - return true; + values[name] = false; } } else {