I am using JQuery Select2 component (see here: http://ivaynberg.github.io/select2/ ) but I have problem configuring it so it would serve dual purpose - as autosuggest for matching data but also as a text box for new entries. Can someone help me configure that component correctly, please?
            Asked
            
        
        
            Active
            
        
            Viewed 7,954 times
        
    2 Answers
1
            I believe you are looking for the Tagging option:
It will allow you to set up your own data to match to but accepts custom inputs.
$("#e20").select2({               
    tags:["red", "green", "blue"],              
    tokenSeparators: [",", " "]
});
 
    
    
        Kelz
        
- 494
- 4
- 9
- 
                    That will look really odd if you only want one item I'd suggest you use this instead: http://stackoverflow.com/questions/14577014/select2-dropdown-but-allow-new-values-by-user – user2019515 Jun 10 '14 at 00:53
 
     
    