public function views_handler_filter_fields_compare::options_form in Views (for Drupal 7) 7.3
Provide the basic form which calls through to subforms.
If overridden, it is best to call through to the parent, or to at least make sure all of the functions in this form are called.
Overrides views_handler_filter::options_form
File
- handlers/
views_handler_filter_fields_compare.inc, line 66 - Definition of views_handler_filter_fields_compare.
Class
- views_handler_filter_fields_compare
- A handler to filter a view using fields comparison.
Code
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$field_options = $this
->field_options();
$form['left_field'] = array(
'#type' => 'select',
'#title' => t('Left field'),
'#default_value' => $this->options['left_field'],
'#options' => $field_options,
'#weight' => -3,
);
$form['operator'] = array(
'#type' => 'select',
'#title' => t('Operator'),
'#default_value' => $this->options['operator'],
'#options' => $this
->fields_operator_options(),
'#weight' => -2,
);
$form['right_field'] = array(
'#type' => 'select',
'#title' => t('Right field'),
'#default_value' => $this->options['right_field'],
'#options' => $field_options,
'#weight' => -1,
);
}