Lucee - cfinput autosuggest


We have a piece of code which is throwing the error:
attribute [autosuggest] is not supported

The Lucee docs suggest this is supported:


Anyone else use this autosuggest attribute?


Hi Luke,

I use instead. Maybe it helps?
Never used cfinput autoSuggest.

The OP was referring to cfinput, at the link provided. Autosuggest is referred to there, and as the OP has stated does not work, and doesn’t work many years later today. The reference does not indicate any obsolescence or deprecation.

The autocomplete is not quite the same thing as autosuggest. How would one make it first-character sensitive?


Do you mean with jquery UI or the old cfinput code?

Lucee doesn’t support autosuggest despite what the documentation states but I’d like to have something, perhaps jqueryui stuff, give the first-character sensitivity that ColdFusion can do.

(and if possible, allow commas and apostrophes to be part of the suggest)

have you seen horsey?

I have filed a bug about the documentation describing unsupported attributes

No but thanks. Checked the horsey link. It still isn’t first-character sensitive. Enter an “e” for first character. It matches to apple and orange.

The code is listed there. Is there something in there that I can modify or add that will limit to the start of the data list items (e.g. name)? Dread, but I suppose the download with the .js is where it would need to be changed.

Thanks for the bug report too.

The jquery ui docs have an example at the bottom of autosuggest on how to do it.

Crap. I didn’t finish scrolling to the end. That’s it. Thanks for showing me.

Script function block needs to be after cfform as:

<cfform action="index.cfm" method="post" name="f1"> 
var tags = [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby" ];
$( "#auto1" ).autocomplete({
  source: function( request, response ) {
          var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( request.term ), "i" );
          response( $.grep( tags, function( item ){
              return matcher.test( item );
          }) );

You can pass in your own filter function