Proposal for "HTML_QuickForm_SelectFilter"

» Metadata » Status
» Description
This new component for QuickForm gives the ability to add a text box that will be used to filter data in one or more select boxes.

Here are the source and two examples:

http://www.gasteroprod.com/data/pear/

The filter can be used to get options that begin with the text you specify, or contain that text. This is the aim of the "true" or "false" second parameter, after the name of the target select.

I already used it in an application where I have a select box of more than 100 clients, each option being represented by a string containing both the reference and the name of the client.

I can type part of the reference or part of the name of the client, and the select box is filtered to show me only a part of the list. It is then easier to select the one I want. (maybe you have already noticed that if there is only one value left, it is automagically selected).

This is just a real life example, I have already seen many people interrested in this component for other usages in web applications. Imagine this used to filter a list of countries, or a list of artists, or whatever you need to have in a list with more than 10 options.

The good thing IMHO is that it is just a facility, you don't *have to* use the filter in order to make the selection.

I prefer this to another solution that many people use: popups with lists of values, and inactive text fields in the form that are filled in with the value selected in the popup.
» Dependencies » Links
  • HTML_QuickForm
» Timeline » Changelog
  • First Draft: 2004-11-12
  • Proposal: 2004-11-12
  • Call for Votes: 2004-11-25
  • Voting Extended: 2004-12-03