Selector type populated via database field - or added to by the user dynamically
I’d like to prompt my users with a selector that contains values populated via an arbitrary database field, and from which they are able to select zero or more of those values.
If the particular value they are searching for is not found from that list, the user will have the option to add that particular value (and select it). This new value could then be added to the existing set of possible values (or at least, I would be able to add it myself manually at a later point).
Much like how the Tag or Category selector operates - the user can start typing and they will get a sub-selection of values returned, against which they’ll able to select the values they want. But, with the addition of user-supplied values too.
I would like users to share the prior companies at which they have worked.
The feature would use a database field on the backend with, say, 1,000 of the most common companies my users might have worked at, populated by myself (maybe via a script, or directly pasted into the CWP admin page).
Example: existing company in database
User starts typing ‘A’, and the selector returns:
…the user selects ‘Apple’, and it now appears in a ‘badge’ at the top of the selector. The user can search and select more companies if they would like.
Example: company not in database
User types ‘Cisco’, but the selector does not return a result (because ‘Cisco’ is not currently in the database).
User is able to create ‘Cisco’, which they do, and now it appears in a ‘badge’ at the top of the selector. Additionally, ‘Cisco’ has been added to the selector source database field.
The UI for this selector would operate much like the “Optional Tags” field displayed when creating a new Topic in Discourse i.e. search for an existing tag, but create a new tag if need be.