I've this need, and I'm not able to accomplish it using Select2.
User must choose a name from a list. This list is a well-defined list of strings. So I think to pass this list as 'data' to Select2.
If user wants, he can choose a new name, and it must be accepted without problem, without saying and asking nothing to user.
So I tried to use an INPUT as element, using data: to feed default list, and to user createSearchChoice to return a new object with id: term, text: term
But I got
query function not defined for Select2 OrdiniCaricati_Nome_Cliente
What's the right combination on properties / element / functions to use?