https://github.com/wipplay/jquery-tokeninput
Added a feature to allow end-user to add new token to the token reference. Added options to permit this are :
-
allowAddTokenReference (boolean) default: false Switch this to "true" and the plugin will show a new button at the end of the dropdown.
-
addNewTokenReferenceText (string) default: "Add new token" The text of the button shown at the end of the dropdown.
-
onAddNewReference (function) The JS function to execute when the button is clicked.
Tokeninput is a jQuery plugin which allows your users to select multiple items from a predefined list, using autocompletion as they type to find each item. You may have seen a similar type of text entry when filling in the recipients field sending messages on facebook.
Full details and documentation can be found on the project page here: