function options_field_widget_info
options_field_widget_info()
Implements hook_field_widget_info().
Field type modules willing to use those widgets should:
- Use hook_field_widget_info_alter() to append their field own types to the list of types supported by the widgets,
- Implement hook_options_list() to provide the list of options.
See list.module.
File
- modules/field/modules/options/options.module, line 41
- 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(), 'behaviors' => array( 'multiple values' => FIELD_BEHAVIOR_CUSTOM, ), ), 'options_buttons' => array( 'label' => t('Check boxes/radio buttons'), 'field types' => array(), 'behaviors' => array( 'multiple values' => FIELD_BEHAVIOR_CUSTOM, ), ), 'options_onoff' => array( 'label' => t('Single on/off checkbox'), 'field types' => array(), 'behaviors' => array( 'multiple values' => FIELD_BEHAVIOR_CUSTOM, ), 'settings' => array('display_label' => 0), ), ); }
© 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!options!options.module/function/options_field_widget_info/7.x