I hit a snag with the Form.serialize function today that took me a while to figure out what was going on. Blame it on a confusing doc, because this certainly could have been explained with more clarity.
I hit upon the problem because I would serialize my form, then try to add more keys to it, using the set function. That would throw errors, and I couldn’t figure out why.
So, there’s a couple of ways around it. The simplest one I like is to immediately create it as a Prototype Hash, so you can do what you would normally do.
var h = $H($(‘form’).serialize(true));