Auto suggestive search field


#1

Silverstripe 4.0.6

It has been a while since i’ve used silverstripe (still know the basics). But i wanted to create a auto suggestive search field. I have a working one using standard php and an sql database but i wanted to know what the best way is to create one in silverstripe.


#2

When I’ve done stuff like this before, I’ve favoured something like Twitter’s typeahead library: typeahead.js

By using something that operates primarily at the client end, you eliminate the repeated http requests and database lookups, which all take time. You can seed it with any data you like, so you’d get that via a normal controller method.