function views_fields_combine_handler_field_combine::options_form in Views fields combine 7
Default options form provides the label widget that all fields should have.
Overrides views_handler_field::options_form
File
- includes/
handlers/ views_fields_combine_handler_field_combine.inc, line 25 - A handler to combine the output of multiple fields into one.
Class
- views_fields_combine_handler_field_combine
- @file A handler to combine the output of multiple fields into one.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$options = $this->view->display_handler
->get_field_labels();
// Remove this field from options.
unset($options[$this->options['id']]);
$form['combined_fields'] = array(
'#type' => 'checkboxes',
'#title' => t('Combined fields'),
'#options' => $options,
'#default_value' => $this->options['combined_fields'],
'#prefix' => '<div id="edit-row-options-combined-wrapper"><div>',
'#suffix' => '</div></div>',
);
$form['separator'] = array(
'#title' => t('Separator'),
'#type' => 'textfield',
'#size' => 10,
'#default_value' => isset($this->options['separator']) ? $this->options['separator'] : '',
'#description' => t('The separator may be placed between combined fields to keep them from squishing up next to each other. You may use some basic HTML tags (@tags) in this field.', array(
'@tags' => implode(', ', $this->options['separator_allowed_tags']),
)),
);
$form['hide_empty'] = array(
'#type' => 'checkbox',
'#title' => t('Hide empty fields'),
'#default_value' => $this->options['hide_empty'],
'#description' => t('Do not display fields, labels or markup for fields that are empty.'),
);
}