Jquery autocomplete for input form, using Textpattern category list as a source

Posted by John Stephens on Stack Overflow See other posts from Stack Overflow or by John Stephens
Published on 2009-03-04T19:23:28Z Indexed on 2010/06/12 9:42 UTC
Read the original article Hit count: 257

I'm using the Textpattern CMS to build a discussion site-- I have a firm grasp of XHTML and CSS, as well as Textpattern's template language, but PHP and Javascript are a bit beyond my cunning.

On the input form to begin a new topic, users need to select a category from a list of over 5,000 options. Using the HTML select-type input element is very unwieldy, but it works. I would like to use some kind of Javascript magic to display a text-type input element that will read user input and display matches or autocomplete from the available categories, passing the required option's value into the appropriate database field.

I've seen several autocomplete plugins for jquery, but the instructions presuppose that you understand how Javascript works.

As I mentioned above, it's easy for me to generate the category list as a select-type input element, and I can hide that element using CSS. Is it possible to control select-list input using an autocomplete mechanism in a text-type input element? How would I do that?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery