Posted by keithm on July 12, 2011 at 11:48am
The text_select module provides an enhanced version of the textfield Form API element. The text_select element is used for text input and ajax autocompletion like textfield, but along with the text value, the element manages an associated key stored in a hidden field, in a similar way that a select element does. This way the user sees the text value but the key is available for database lookup, etc.
This element requires a separate implementation of #autocomplete_path to be useful. See the text_select_example module for one way to implement this. text_select_example defines a simple field that uses a text_select element for its widget.
This module is intended only for developers.