You are here

function ds_handler_field_fieldgroup::options_form in Display Suite 6

Same name and namespace in other branches
  1. 6.3 views/ds_handler_field_fieldgroup.inc \ds_handler_field_fieldgroup::options_form()
  2. 6.2 views/ds_handler_field_fieldgroup.inc \ds_handler_field_fieldgroup::options_form()

File

views/ds_handler_field_fieldgroup.inc, line 23
Contains the display suite fieldgroup handler.

Class

ds_handler_field_fieldgroup
Field handler to create a fieldgroup.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $options = array(
    'ds_field' => 'A simple div',
    'ds_group_fieldset_open' => 'Fieldset open',
    'ds_group_fieldset_collapsible' => 'Fieldset collapsible',
    'ds_group_fieldset_collapsed' => 'Fieldset collapsed',
  );
  if (module_exists('tabs')) {
    $options['tabs'] = 'Tabs';
  }
  $form['ds_format'] = array(
    '#type' => 'select',
    '#title' => t('Format'),
    '#default_value' => $this->options['ds_format'],
    '#options' => $options,
  );

  // Remove all the rest that's normall associated with fields.
  unset($form['alter']);
  unset($form['exclude']);
  unset($form['empty']);
  unset($form['empty_zero']);
  unset($form['hide_empty']);
}