i have difficult to use AUI Select2 with something more complex than hard coded options. How to properly use this component?
http://jsfiddle.net/0v74wvnr/ attempt to init AUI Select2 from array.
https://bitbucket.org/anton_ronin/aui-select2-not-today attempts to init AUI Select2 from array, via ajax. Trying almost everything.
Community moderators have prevented the ability to post new answers.
Hi Anton,
You will need to declare your base element as
<input id="select2-example">
Then use the following for your declaration:
AJS.$("#select2-example").auiSelect2({ data:options, multiple: true });
Then it should work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
AUI Select 2 uses Select2 3.5.3 in the background, so the documentation there should be able to get you started:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.