Browse Source

Fix unchecked checkboxes not being accessible with get value

pull/2743/head
jlukic 9 years ago
parent
commit
688c64551a
2 changed files with 4 additions and 5 deletions
  1. 1
      RELEASE-NOTES.md
  2. 8
      src/definitions/behaviors/form.js

1
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

8
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 {

Loading…
Cancel
Save