function options_field_widget_info

Implements hook_field_widget_info().

Field type modules willing to use those widgets should:

File

drupal/core/modules/field/modules/options/options.module, line 443
Defines selection, check box and radio button widgets for text and numeric fields.

Code

function options_field_widget_info() {
  return array(
    'options_select' => array(
      'label' => t('Select list'),
      'field types' => array(
        'list_integer',
        'list_float',
        'list_text',
      ),
      'behaviors' => array(
        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
      ),
    ),
    'options_buttons' => array(
      'label' => t('Check boxes/radio buttons'),
      'field types' => array(
        'list_integer',
        'list_float',
        'list_text',
        'list_boolean',
      ),
      'behaviors' => array(
        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
      ),
    ),
    'options_onoff' => array(
      'label' => t('Single on/off checkbox'),
      'field types' => array(
        'list_boolean',
      ),
      'behaviors' => array(
        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
      ),
      'settings' => array(
        'display_label' => 0,
      ),
    ),
  );
}