paulstraw/FancySelect

Multiple instances of fancyselect not showing up in POST data.

Closed this issue · 4 comments

I have a page which about 10 different html lists for the user to chose, each one gets their own little $('#menu').fancySelect(); or what not. For some reason, only the first select menu data goes through in the post data (or GET for that matter). Do I need to do something beyond just the simple fancySelect() call to get multiple lists to work?

Nope. We use multiple FancySelect instances in a single form all the time. Can you send through a bit more info on your code?

(Specifically, the HTML and JS would be great)

Well here is how I call the JS :

$(document).ready(function() {

     $('#menu').fancySelect();
     $('#menu2').fancySelect();

    });

screenshot from 2014-02-08 23 17 48

the data from #menu shows up the POST/GET array passed to the form, but the #menu2 does not even show up at all when I do a print_r($POST) in php.

I'm pretty rusty at coding right now so maybe I'm just missing something really ovbvious. Thanks for your quick reply!

And I should mention that when I don't enable any fancyselects, all my form data goes through fine... .weird.