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?
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
Copy link to clipboard
Copied
Brilliant, thanks.