I wrote the following function that turns a div/Form into serialized object. I use this returned to pass into my database javascript calling methods.
Tater.prototype._formToObject = function(formData) {
var p = {};
jQuery.each(jQuery(formData).serializeArray(),function(i, e){
p[e.name] = e.value;
});
return p;
};
The only issue is if I change my form to have a multiple select option, it only grabs the first value of the multiple selected. How would I extend this to allow for such behavior?