Select2, when no option matches, “other” should appear
问题 With select2 dropdown, how do I get a default option to appear if no options match the user's typed input? $("something").select2({ formatNoMatches: function(term) { //return a search choice } }); I haven't been able to find anything that really matches this desired functionality within the select2 documentation or Stack Overflow. Edit I'm getting closer with this $("something").select2({ formatNoMatches: function(term) { return "<div class='select2-result-label'><span class='select2-match'><