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

Can an autosuggest cfinput be controlled/filtered by a select menu?

New Here ,
Dec 02, 2009 Dec 02, 2009

Copy link to clipboard

Copied

I'm working on a search service where there are going to be at least 3 types of searches, each of which can be made easier by using an autosuggest.  Is it possible to change the binding/returned values for the autosuggest based on what the user has selected in a select menu?

TOPICS
Advanced techniques

Views

324

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
New Here ,
Dec 02, 2009 Dec 02, 2009

Copy link to clipboard

Copied

Yes, its fairly straightforward to pass more values to the CFC doing the autosuggest:

<cfform>

Art:

<select name="addThis" id="addThis">

<option>Yes</option>

<option>Test</option>

</select>

<cfinput type="text"

        name="artname"

        autosuggest="cfc:art.lookupArt({cfautosuggestvalue}, {addThis})">

</cfform>

This will pass the value of addThis to the lookupArt function in art.cfc

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
New Here ,
Dec 04, 2009 Dec 04, 2009

Copy link to clipboard

Copied

LATEST

Brilliant, thanks.

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