The ChoiceField
is an abstract base class that is analogous to a drop list or pick list on other platforms. You can't use a ChoiceField
directly, instead you must use one of the two specialty-derived classes—the NumericChoiceField
or the ObjectChoiceField
. These classes have common functionality though, which we can outline here.
Using a ChoiceField
type of field allows the user to choose a specific value from a short list of predetermined values. Initially, the ChoiceField
is collapsed and shows only the selected value.
When you click the trackball while the field is selected a small dialog opens up to display the full list of possible choices. The user can scroll up and down in the list and click the trackball to select a value.
A ChoiceField
type of class is typically used when there is a small and fixed list of possible choices that does not lend itself to the user entering free-form text. As a designer, you have to make sure that the complete list is represented because the...