Commit ac97d15a by 若依 Committed by Gitee

!136 optgroup标签下多选后表单值转json丢失

Merge pull request !136 from Dulk/fix-optgroup_value_jsonOverride_bug
parents 83ed5fc2 1166be1e
......@@ -1353,7 +1353,11 @@
formToJSON: function(formId) {
var json = {};
$.each($("#" + formId).serializeArray(), function(i, field) {
json[field.name] = field.value;
if(json[field.name]) {
json[field.name] += ("," + field.value);
} else {
json[field.name] = field.value;
}
});
return json;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment