wenzhixin / multiple-select

A jQuery plugin to select multiple elements with checkboxes :)
http://multiple-select.wenzhixin.net.cn
MIT License
1.91k stars 651 forks source link

Checkbox element name #553

Open scorninpc opened 4 years ago

scorninpc commented 4 years ago

Hello. First, thank you for this nice plugin

But i have some problems with all hooks between submit button and send the form, so serialize and validate and validate human captchas, etc etc and send the POST

So i made some changes on here: https://github.com/wenzhixin/multiple-select/blob/develop/src/MultipleSelect.js#L462 adding the name = this.options.name

Sorry for not fork and commit, it's because i dont know if this is the focus of the project. But, there is my way to solve that

So, for the name i use array like

multiple ({name: "field[]"});

And after POST, i have all values ​​checked

Thank you