function options_field_widget_settings_form

Implements hook_field_widget_settings_form().

File

modules/field/modules/options/options.module, line 155

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;
}

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