Permalink
Browse files

Merge commit '01631d841c534969d5db1b514f8da2e437f8f8b5' into checkbox…

…fixes
  • Loading branch information...
2 parents dbbab50 + 01631d8 commit 9270422ebb24ce659bb6281e27301f2fcf6dbb18 @lookfirst committed Dec 16, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/form2js.js
View
@@ -242,8 +242,11 @@ var form2js = (function()
result = [callbackResult];
}
else if (fieldName != '' && node.nodeName.match(/INPUT|TEXTAREA/i)) {
- fieldValue = getFieldValue(node);
- result = [ { name: fieldName, value: fieldValue} ];
+ fieldValue = getFieldValue(node);
+ if(node.type == 'radio' && fieldValue == null)
+ result = [];
+ else
+ result = [ { name: fieldName, value: fieldValue} ];
}
else if (fieldName != '' && node.nodeName.match(/SELECT/i)) {
fieldValue = getFieldValue(node);

0 comments on commit 9270422

Please sign in to comment.