tail.select.js
tail.select.js copied to clipboard
multi-select gets values of options and show them
I want this multi-select to get an array of values and show the options but it doesn't work even for showing one option. Could you please help me with this? thanks in advanced
If this is PHP, you first need to build the <select> element, and then call tail.select() on it.
If this is JavaScript, it's the same, you need to build all options from an array and then call tail.select(). If the array is coming from an external URL, you might need to use an await function, or a Promise. Otherwise, just make sure the <select> element exists before calling tail.select().