Is there a way to do an auto complete text box?

sophy978 24 Sep, 2009
Does anyone know a way to do an auto complete in a text box field?

For example, I have a list of 30 fixed Error codes along with a short title or description for each. So when a user starts entering a value that matches with any of the 40 I have listed, it will auto complete the box with that, or the user can pick through the rest that are similar. If there is no match, then they can just continuing typing their text. I hope this is clear?🤨

A drop down with 40 selections would be too much for a user to scroll, so I thought if I can have them at least start typing it, I can match it up - if it's is possible.

Thanks for any suggestions.
GreyHead 24 Sep, 2009
Hi sophy978,

I use digitarald' AutoCompleter with ChronoForms - it works effectively. I've most used it to do AJAX autocomplete but it should work with a local list as well.

http://digitarald.de/project/autocompleter/

Bob

PS There is a newver version at clientcide.com but it requires MooTools 1.2 and Joomla uses 1.1
sophy978 18 Feb, 2010
Thanks Bob for the suggestion on digitarald' AutoCompleter with ChronoForms. I will look into that as well.

Now there is a slight change to my initial request. It works similar to the auto complete or possibly it is the same thing?

So I would have a table with two columns, one with the codes and one with the corresponding error descriptions. So when a user enters a code in one field, another fields gets populated (automatically) with the corresponding error description. Is there another way to do this, or should I try using the Digitarald AutoCompleter?

Thanks for you help.

-Sophy
GreyHead 18 Feb, 2010
Hi Sophy,

If the list is short then I'd probably load it into the page and use JavScript to load the messages into the table. If it's a long list then the answer is an AJAX lookup going back to some PHP code in one of the form Extra Code boxes.

Bob

The AutoCompleter is used when you want to detecet what is being entered in the field character by character and I'm guessing you don't need that with an error code.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger