Skip navigation
Currently Being Moderated

cfautosuggest in CF 9.0.1

Apr 1, 2012 2:03 PM

I am running into issues implementing autosuggest with CF9.01. 

 

test.cfm is extremely simple:

 

<cfform action="test.cfm" method="post">

 

<cfinput name="foo" type="text" autoSuggest="cfc:/cfdocs/ElectricDream/Controllers/AutoSuggest.FindCo nsumer({cfautosuggestvalue})">

<br /><br />

 

<input type="submit" value="Add">

</cfform>

 

AutoSuggest.cfc says:

 

<cfcomponent>

 

<cffunction name="FindConsumer" access="remote" returntype="Array" output="false">

<cfargument name="SearchTerm" required="false">

 

<cfset myarray=["Vivian", "Vito", "Aidan", "Aaron", "Robert"]>

 

<cfreturn myarray>

 

 

</cffunction>

 

</cfcomponent>

 

As you can see, I am creating a static array (the real one will of course depend on the text in the cfinput box).

 

This CFC works fine if I invoke it from a CFM page; I get an array with the names.

 

But it does nothing in this form.

 

I saw Adam's response re using oncfcrequest, and can't figure out what change to make. I added the cffunction to application.cfc, and that did not do the trick.

 

What am I missing?

 

Thx.

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points