1 options.module | options_field_widget_settings_form($field, $instance) |
Implements hook_field_widget_settings_form().
File
- core/
modules/ field/ modules/ options/ options.module, line 166 - Defines selection, check box and radio button widgets for text and numeric fields.
Code
function options_field_widget_settings_form($field, $instance) {
$form = array();
if ($instance['widget']['type'] == 'options_onoff') {
$form['display_label'] = array(
'#type' => 'checkbox',
'#title' => t('Use field label instead of the "On value" as label'),
'#default_value' => $instance['widget']['settings']['display_label'],
'#weight' => -1,
);
}
return $form;
}