Commit ae84fff8 authored by Gregor Schmidt's avatar Gregor Schmidt

[#419] Fixing broken multi-select serialization in prototype 1.7

See https://prototype.lighthouseapp.com/projects/8886/tickets/1180 for details.

Contributed by Ben Gunter.
parent 3a14bff7
......@@ -4992,7 +4992,13 @@ var Form = {
key = element.name; value = $(element).getValue();
if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
submit !== false && (!submit || key == submit) && (submitted = true)))) {
result = accumulator(result, key, value);
if (Object.isArray(value)){
value.each(function(value) {
result = accumulator(result, key, value);
});
} else {
result = accumulator(result, key, value);
}
}
}
return result;
......
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