On this page
function list_field_widget_info_alter
list_field_widget_info_alter(&$info)
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
File
- modules/field/modules/list/list.module, line 422
- Defines list field types that can be used with the Options module.
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);
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!modules!list!list.module/function/list_field_widget_info_alter/7.x