| 1 field_example.module | field_example_field_widget_info() | 
Implements hook_field_widget_info().
Three widgets are provided.
- A simple text-only widget where the user enters the '#ffffff'.
- A 3-textfield widget that gathers the red, green, and blue values separately.
- A Farbtastic color-picker widget that chooses the value graphically.
These widget types will eventually show up in hook_field_widget_form, where we will have to flesh them out.
See also
field_example_field_widget_form()
Related topics
File
- modules/examples/ field_example/ field_example.module, line 200 
- Hook implementations for the Field Example module.
Code
function field_example_field_widget_info() {
  return array(
    'field_example_text' => array(
      'label' => t('RGB value as #ffffff'),
      'field types' => array('field_example_rgb'),
    ),
    'field_example_3text' => array(
      'label' => t('RGB text field'),
      'field types' => array('field_example_rgb'),
    ),
    'field_example_colorpicker' => array(
      'label' => t('Color Picker'),
      'field types' => array('field_example_rgb'),
    ),
  );
}
