function views_handler_field_content_multiple::options_form in Content Construction Kit (CCK) 6
Provide 'group multiple values' option.
Overrides views_handler_field_content::options_form
File
- includes/
content.views.inc, line 356
Class
- views_handler_field_content_multiple
- An extended subclass for field handling that adds multiple field grouping.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$field = $this->content_field;
$options = $this->options;
$form['multiple'] = array(
'#access' => $field['multiple'],
);
$form['multiple']['group'] = array(
'#title' => t('Group multiple values'),
'#type' => 'checkbox',
'#default_value' => $options['multiple']['group'],
);
$form['multiple']['multiple_number'] = array(
'#type' => 'textfield',
'#size' => 5,
'#field_prefix' => t('Show') . ' ',
'#field_suffix' => t(' values,'),
'#default_value' => $options['multiple']['multiple_number'],
'#prefix' => '<div class="container-inline">',
);
$form['multiple']['multiple_from'] = array(
'#type' => 'textfield',
'#size' => 5,
'#field_prefix' => t('Starting from') . ' ',
'#default_value' => $options['multiple']['multiple_from'],
);
$form['multiple']['multiple_reversed'] = array(
'#title' => t('Start from last values'),
'#type' => 'checkbox',
'#default_value' => $options['multiple']['multiple_reversed'],
'#suffix' => '</div>',
);
}