You are here

function multiselect_widget_settings in Multiselect 6

Implementation of hook_widget_settings().

File

./multiselect.module, line 52
Allows users to select multiple items in an easier way than the normal node-reference widget.

Code

function multiselect_widget_settings($op, $widget) {
  switch ($op) {
    case 'form':
      $form['settings'] = array(
        '#type' => 'fieldset',
        '#title' => t('Settings for Options'),
        '#collapsible' => TRUE,
        '#weight' => 10,
      );
      $form['settings']['show_depth'] = array(
        '#type' => 'checkbox',
        '#title' => t('Indent child terms with \' - \' signs'),
        '#default_value' => is_numeric($widget['show_depth']) ? $widget['show_depth'] : 1,
        '#description' => t('If this option is checked, a hierarchy gets visualized by indenting child terms, otherwise it\'s a flat list'),
      );
      return $form;
    case 'save':
      return array(
        'show_depth',
      );
  }
}