From fab0774c4beecaf6472777a6502a1818edc26927 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 29 Apr 2011 07:38:24 +0000 Subject: [PATCH] Fixes Prototypejs Form.serialize() for multiple selects (#7954). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@5586 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/prototype.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/javascripts/prototype.js b/public/javascripts/prototype.js index db86961e4..f84a52e2a 100644 --- a/public/javascripts/prototype.js +++ b/public/javascripts/prototype.js @@ -4993,7 +4993,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; -- 2.39.5