Search code examples
typeahead.jsbootstrap-typeahead

Proper use of Typeahead?


I have a remote Typeahead example up and running. However, I'm wondering if I'm using it for its intended purposes.

Essentially, even though it displays the appropriate content, I need the unique identifier of the data displayed to be submitted.

The remote URL will return something like this:

[{"id":"123456789", "email":"me@server.com", "value":"Me Lastname"}]

So, display Me Lastname, but actually submit 123456789?

My gut is telling me I need something else, maybe something like this: Select2 ?


Solution

  • I ended up using the following jQuery/Bootstrap3 library: Select2