AutoComplete, but optional

15 views
Skip to first unread message

Trav

unread,
Oct 29, 2009, 9:10:21 PM10/29/09
to Lift
My goal is to use auto complete for "suggested" text box values.
Unfortunately, when using the AutoComplete wiget, the onsubmit
function receives an empty string if a value is not selected from the
drop down.

Is there any way around this?

thanks,
-Trav

Trav

unread,
Oct 30, 2009, 9:49:35 AM10/30/09
to Lift
My solution was to copy and paste the AutoComplete code and remove the
use of the hidden field. The hidden field was what was being used as
the form value and it was only updated when the value typed and/or
selected was one of the autocomplete values. Removing the hidden
field still allows the jquery autocomplete functionality of selecting
and formatting, however if someone didn't want to use of the the
autocomplete values, they could type something different and it would
be submitted normally with the form.

David Pollak

unread,
Nov 5, 2009, 5:22:12 PM11/5/09
to lif...@googlegroups.com

Please open a ticket for this issue at http://github.com/dpp/liftweb/issues
 

thanks,
-Trav





--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics
Reply all
Reply to author
Forward
0 new messages