macek/jquery-serialize-object

Does not serialize correctly when the form field is a jQuery.Chosen multi select field

rvarma1848 opened this issue · 3 comments

I am using jquery.chosen() with multiple turned on. With this option, I can choose more than one choices in the field. When I select more than one option, the serializeObject picks up only the last option of the chosen options.

https://harvesthq.github.io/chosen/options.html

macek commented

This is not an issue I'm willing to support. I have no idea what the jQuery Chosen plugin does to manipulate the behavior of inputs.

As it stands right now, jQuery serializeObject depends on jQuery's native serializeArray function. If your form doesn't serialize properly into an array, it will also not work with this plugin.

You can stay tuned for a the 3.x version which is removing the serializeArray dependency as it's been a source of a plethora of other problems and a barricade for countless would-be-nice features.

Thanks for your quick response. I figured out why it was not working.
I needed to use [] at the end of the name when it is a multi-select.
for example
name="users[]"

Thanks for your quick response. I figured out why it was not working.

I needed to use [] at the end of the name when it is a multi-select.

for example
name="users[]"

I am unable to comment further

On Sun, Jul 19, 2015 at 12:34 AM, Paul Maček notifications@github.com
wrote:

This is not an issue I'm willing to support. I have no idea what the
jQuery Chosen plugin does to manipulate the behavior of inputs.

As it stands right now, jQuery serializeObject depends on jQuery's native
serializeArray function. If your form doesn't serialize properly into an
array, it will also not work with this plugin.

You can stay tuned for a the 3.x version which is removing the
serializeArray dependency as it's been a source of a plethora of other
problems and a barricade for countless would-be-nice features.


Reply to this email directly or view it on GitHub
#70 (comment)
.