Skip to main content
Participant
December 2, 2009
Question

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

  • December 2, 2009
  • 1 reply
  • 387 views

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?

This topic has been closed for replies.

1 reply

Participating Frequently
December 2, 2009

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

BealsAuthor
Participant
December 4, 2009

Brilliant, thanks.