Tag Archives: Matcher


Use this method to override how string match is conducted.¬†By default, the PHP Autocomplete matches searched term anywhere in options. In most case, you don’t need to call this method. Keep in mind that only a single matcher can be used.


public function set_matcher($js_cust_matcher)


  • $js_cust_matcher:¬†JavaScript function to set custom matcher

Example that demos case sensitive search and must search from the beginning of the string

// only a single matcher can be used at a time
function search_casesensitive_and_startbeginning(term, text){
    return (text.indexOf(term)>=0)