You are here

function options_field_widget_settings_form in Drupal 7

Implements hook_field_widget_settings_form().

File

modules/field/modules/options/options.module, line 155
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;
}