I'm trying to use the createSearchChoice function to allow users to enter their own choice when the default list won't suffice. When I try to use this function on a <select>
element, I get the following error:
Error: Error: Option 'createSearchChoice' is not allowed for Select2 when attached to a <select> element.
I tried using an <input type='hidden'>
element instead, but now get the following error:
Error: uncaught exception: query function not defined for Select2 'MyInputName'
I'd prefer to use the select element to stay in line with existing code (need the ability to select multiple options), but just need the ability for users to input their own option in addition to selecting from a prior list.
data: ...
– Malan