• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Autosuggest - beyond the 1st word match

Participant ,
May 16, 2009 May 16, 2009

Copy link to clipboard

Copied

I've searched for this and come to the conclusion that the answer is either so obvious that it's staring me right in the face, or else it's just something that the built-in autosuggest widget won't handle.

I have a simple <cfinput> field that looks up a user account based on text input. The query it calls searches for a user's first name, last name, or email address based on the input. Using the AJAX debugging screen, I can see that the appropriate results are, in fact, being fetched by the query.

The problem is, quoting from the livedocs for <cfinput>:

"You do not have to limit the returned data to values that match the cfautosuggestvalue contents, because the client-side code displays only the values that match the user input. In fact, the called function or page does not even have to use the value of the cfautosuggestvalue

parameter that you pass to it. You should, however, use the parameter if the returned data would otherwise be long."

It's deciding that 'matching the user input' means 'matching the first word of the query results.' In other words, if I have two users, one named Joe Smith and one named Smith Joe, and I search for Smith, it will display Smith Joe but not Joe Smith, because it doesn't 'match.'

Is there some way I can say that, if it matches ANY of the words in the query results, rather than just the first one, to include it in the list of autosuggestions?

Thanks,

Aq

TOPICS
Advanced techniques

Views

438

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 16, 2009 May 16, 2009

Copy link to clipboard

Copied

LATEST

Answering my own question:

Found the solution here:

http://betterautosuggest.riaforge.org/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation