Skip to content

Commit

Permalink
fix radio submission when radio is not set with a default value.
Browse files Browse the repository at this point in the history
  • Loading branch information
driskull committed Dec 11, 2015
1 parent 5635de2 commit c5abb86
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2188,9 +2188,11 @@ define([
});
// each radio button
array.forEach(query(".geoFormQuestionare .radioContainer"), function (currentField) {
key = query(".radioInput:checked", currentField)[0].name;
if (query(".radioInput:checked", currentField).length !== 0) {
value = lang.trim(query(".radioInput:checked", currentField)[0].value);
var radioFields = query(".radioInput:checked", currentField);
if (radioFields.length) {
var selectedField = radioFields[0];
key = selectedField.name;
value = lang.trim(selectedField.value);
featureData.attributes[key] = value;
}
});
Expand Down

0 comments on commit c5abb86

Please sign in to comment.