« Layering Flex over AJAX and collaborating with data services -- whoa! | Main | AS3 technique -- using object instances as "enums" »

April 3, 2006

Flex auto complete text input control v0.6

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.

NOTE: Flex beta 2 is REQUIRED for viewing or using this control.
[Sample -- Simple form using CompletionInput]
[Source code]

Known issues:

Let me know what you think. And if you find any bugs, please let me know (especially if you have a fix!!)

Posted by sho at April 3, 2006 10:41 AM