[The auto complete text input control has been updated for the beta 3 version of the player. You can find the code here. –Sho, May 11, 2006]
Here is a new version of the auto complete text input control, which is a cross between Google suggest, the “save information I typed in forms” preference found in browsers, and the HTML <select> control.
If you provide a static list of items to the control, the control can do the filtering. Alternatively, you can create a function to give suggestions (which is necessary if you are doing the filtering on the server).
As before, there is a “mustSelect” flag which turns the control into a sort of super version of the HTML <select> tag. The main benefit to using this instead of <select> is that using the keyboard to narrow down your choices is much easier.
Finally, I added the ability to automatically save form data as local storage and provide hints based on this data. This makes it behave similarly to HTML text fields in most browsers.
Unlike how browsers work (so far…) you can individually delete these hints. I hate it when I mistype something into a field and I get a hint for that typo every time I visit the app! With these controls, you can right mouse on any of the hints you don’t like and delete them.
Source code removed. Please use the more recent version referenced above.
More »