New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I disable the Selectmenu Widget for specific fields? #263
Comments
What exactly do you mean with Multiselect? The Selecmenu Widget does not support multiselect feature. I'm not quite sure if I understand you right, but I will try :-) A demo fiddle (see #61) or a link would be helpful! |
I have a lot of native Selects and a few MultiSelects (I'm using another plugin for those). I'd like to replace all the native Selects with the Selectmenu Widget, and disable it for all multiselects or disable specific ones (either by class or individually). Doing it this way would be a lot more efficient and create less room for mistakes by another developer. Can that be done? If not, how would I specify which native Selects should be replaced by the Selectmenu Widget? |
Yes, thats pretty easy. Just call the Selectmenu widget on those selects you need. That can be done by any jQuery selector. Are you familiar with the concept of jQuery selectors? |
I was hoping it would be an easy question ;-) I haven't used jQuery selectors before, but thanks to StackOverflow I found the correct selectors :) $("select#categories:not([multiple])") // with single only $("select#categories[multiple]") // with multiple I couldn't find a set of easy-to-follow instructions to show me how to use it though, and $("select#categories:not([multiple])").selectmenu(); didn't work :-( Would you be able to show me where to insert it? |
Hey Chaya, here is a demo fiddle: http://jsfiddle.net/GXtpC/591/ |
That's easy :-D Thank you so much! |
Your're welcome! |
The Selectmenu Widget is creating duplicates of Multiselect fields. Is there a way to disable the Selectmenu Widget for specific Select fields (as opposed to the entire form)?
The text was updated successfully, but these errors were encountered: