Drupal fields; improving select lists
Everyone knows what a select list is, what it looks like and how it works. But that doesn't mean it can't get better, here a few modules that can be used to improve the experience for users when selecting items.
Multiselect creates a widget that can be used for multiple fields, including select and term reference. Items can be selected by double clicking them or clicking on them and then the '+' button. Select items appear in the right hand box.
Simply install the module and change your field widget and you're set to go.
Term reference tree
This is a fantastic module useful for term reference fields with multiple depths (though it also works for flat trees). It provides an additional widget and field settings.
When adding/editing a term reference field there are options to force the user to only select child elements, select parents automatically when child terms are selected as well as filtering by a view, parent term id and a maximum depth. The complete field settings can be seen below:
The output shown to the CMS user changes depending on the options selected but will look similar to:
Simple hierarchical select
Another useful module when used with term reference fields. There are fewer options available, but allows users the option to create new terms as well as force selection of only child terms.
Select with style
Rather than completely change the format in which you can select items this module allows you to style them. Two widgets are available, which allow the user to select any term or only child terms.
The module page itself provides great examples of the possibilities of this module, but the general output could look like the below:
The end bit
These are just a few modules I've used in passing, each have their own uses, pros and cons. They all help users to make selecting items easier which can never be a bad thing. If there are any other modules you've used or spotted let me know!
Until next time.