Expose Field API widget types.
An array describing the widget types implemented by the module. The keys are widget type names. To avoid name clashes, widget type names should be prefixed with the name of the module that exposes them. The values are arrays describing the widget type, with the following key/value pairs:
hook_field_widget_info_alter()
hook_field_widget_form_alter()
hook_field_widget_WIDGET_TYPE_form_alter()
hook_field_widget_settings_form()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_field_widget_info() {
return array(
'text_textfield' => array(
'label' => t('Text field'),
'field types' => array(
'text',
),
'settings' => array(
'size' => 60,
),
'behaviors' => array(
'multiple values' => FIELD_BEHAVIOR_DEFAULT,
'default value' => FIELD_BEHAVIOR_DEFAULT,
),
),
'text_textarea' => array(
'label' => t('Text area (multiple rows)'),
'field types' => array(
'text_long',
),
'settings' => array(
'rows' => 5,
),
'behaviors' => array(
'multiple values' => FIELD_BEHAVIOR_DEFAULT,
'default value' => FIELD_BEHAVIOR_DEFAULT,
),
),
'text_textarea_with_summary' => array(
'label' => t('Text area with a summary'),
'field types' => array(
'text_with_summary',
),
'settings' => array(
'rows' => 20,
'summary_rows' => 5,
),
'behaviors' => array(
'multiple values' => FIELD_BEHAVIOR_DEFAULT,
'default value' => FIELD_BEHAVIOR_DEFAULT,
),
// As an advanced widget, force it to sink to the bottom of the choices.
'weight' => 2,
),
);
}