Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

select2


I'm using Saul theme in an MVC application. select2 is not initiated. Based on the documentation it's bundled in the global plugin.
Everything work fine in the page that I'm working on it, but select2 is not initiated. I can see all the related javascript and css code in plugins.bundle.css and .js but it doesn't work. Can you help me fidn out what I'm missing?

In the intialization section I read that there are some SCSS files in sass folder. shoudl I import src folder to my solution as well?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (6)


Shop the best sunblock price in Pakistan with OneSkin. Find affordable yet effective sun protection solutions for every skin type. Shop now and safeguard your skin from harmful UV rays!



Hey Simon,

I am curious what your solution was? I am using the keen theme "Craft", but running into the same issue.

Cheers,
Ian



Hi Ian
You don't need to import any further library. Select2 must be initiated automatically by ~/assets/plugins/hlobal/plugins.bundle.js

Hope that help



Hi Ian,

You can find select2 usage examples in Craft documentation.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,

Can you double-check the original Saul HTML template as Select2 works fine there.

May I know which build method you are using? Gulp or Webpack? if you need any further help can you please share some screenshots using https://imgur.com/ where we can see the issue in your browser console?

Regards.



Thanks for your reply. Issue is fixed.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(