Take my form as an example.
I'm using a combination of inserting bootstrap into the form for styling, and loading a list of entries into a standard text field
The JS code is here
you can load external js file in the form settings.
My example loads a static list, but you could easily load from ajax and filter on type.
Because the end result is actually just entering the text you click on in the text field, it gets posted as normal
Hope this helps someone