Limit number of selectable options in component-select-box

3 replies · opened Nov 3, 2018

BbachibamboNov 3, 2018

Hi - Is there a way I can limit the number of options that a user can select from component-select-box?

To be more specific, I'm trying to limit the number of options a user can select from "SELECT MULTIPLE VALUES" dropdown to 3. Also, how can I add a search filter to this?

http://themes.semicolonweb.com/html/canvas/component-select-box.html

Thanks!

BbachibamboNov 5, 2018

Hello... By far this is the most beautiful web template I came across especially with tons of code that can be used right out of the box. The support also has been great so far but not sure why it seems to be slipping through the cracks now. I'm pretty sure there is an explanation.

Really appreciate if you can address my question and help me out with this.

Thank you very much!!!

SSemicolon WebSTAFFNov 8, 2018

Hello,

Thanks for your Patience!

You can simply add the maximumSelectionLength: 3 Setting in the JS Initialization Code for the Select2 Plugin at the bottom of the Page. Example:

$(".select-1").select2({
	placeholder: "Select Multiple Values",
	maximumSelectionLength: 3
});

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

BbachibamboNov 11, 2018

Thanks a ton! I will give it a shot.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard