by Jeff Eaton on March 26, 2012 // Short URL

Module Monday: Improved Multi Select

How to Allow Users to Select Multiple List Items, Keep Track of Selected Items and Search Lists on Drupal 7

Oh, multiselect form elements. When you need to display a long list of items and users can pick from several of them, they're the only way to go. Why can't they be prettier, though? Why can't they be easier to use? Why can't users select things in them without endlessly scrolling and holding down the control key? The standard HTML multiple-selection element leaves a lot to be desired, if you're looking to spruce it up, check out the new Improved Multi Select module.

Screenshot of an enhanced multiselect form element

Using Improved Multi Select is straightforward: install it, configure it, and any multiselect form elements on your site can be replaced by a handy two-pane "mover" interface that lets users keep track of what they've selected. In addition, it provides a simple search/filter mechanism: type a letter or two, and only the entries containing those letters will be shown. It's nothing fancy, but it can really speed up the process of picking entries from a long list. Since the entire widget is powered by jQuery and CSS, tweaking its appearance to match your site is relatively straightforward.

Setting up the custom widget is a bit of a change if you're used to FieldAPI widgets. Rather than providing a custom widget or form element, this module implements its picker using only jQuery and CSS. On its configuration screen, administrators can choose the URL paths or CSS selectors it should use to determine which multiselect form elements should be enhanced.

Screenshot of the module's configuration screen

The Lullabots are divided on this approach: On the one hand, it means that you can't explicitly choose the enhanced selection widget when building a new form or content type the way some site builders did with the venerable Multiselect module. On the other hand, the technique used by Improved Multi Select can easily be layered on top of any form or FieldAPI widget, even if it wasn't initially designed to take advantage of the swanky jQuery enhancements. Check out both modules if you're uncertain: either one will give some extra polish to your site's administrative forms.