function list_field_widget_info_alter

Implements hook_field_widget_info_alter().

The List module does not implement widgets of its own, but reuses the widgets defined in options.module.

See also

list_options_list()

File

modules/field/modules/list/list.module, line 423

Code

function list_field_widget_info_alter(&$info) {
    $widgets = array(
        'options_select' => array(
            'list_integer',
            'list_float',
            'list_text',
        ),
        'options_buttons' => array(
            'list_integer',
            'list_float',
            'list_text',
            'list_boolean',
        ),
        'options_onoff' => array(
            'list_boolean',
        ),
    );
    foreach ($widgets as $widget => $field_types) {
        $info[$widget]['field types'] = array_merge($info[$widget]['field types'], $field_types);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.