You are here

function date_handler_field_multiple::options_form in Date 7

Same name and namespace in other branches
  1. 6.2 date/date_handler_field_multiple.inc \date_handler_field_multiple::options_form()

Provide 'group multiple values' option, adapted to the needs of the Date module.

Overrides views_handler_field_field::options_form

File

date_views/includes/date_handler_field_multiple.inc, line 37
An extended subclass for field handling that adds multiple field grouping.

Class

date_handler_field_multiple
@file An extended subclass for field handling that adds multiple field grouping.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  unset($form['multiple']);
  $field_name = $this->content_field_name;
  $field = field_info_field($field_name);
  $options = $this->options;

  //$form += date_formatter_settings($form_state, $field, $options, TRUE);
  $form['multiple']['#weight'] = 1;
  $form['multiple']['group'] = array(
    '#title' => t('Group multiple values'),
    '#type' => 'checkbox',
    '#default_value' => $options['multiple']['group'],
    '#description' => t('If unchecked, each item in the field will create a new row, which may appear to cause duplicates. This setting is not compatible with click-sorting in table displays.'),
  );
}