function tripal_views_handler_filter_select_string::extra_options_form
2.x tripal_views_handler_filter_select_string.inc | tripal_views_handler_filter_select_string::extra_options_form(&$form, &$form_state) |
3.x tripal_views_handler_filter_select_string.inc | tripal_views_handler_filter_select_string::extra_options_form(&$form, &$form_state) |
Provide a form for setting options.
Overrides views_handler::extra_options_form
File
- tripal_views/
views/ handlers/ tripal_views_handler_filter_select_string.inc, line 188 - Contains tripal_views_handler_filter_select_string Filter Handler
Class
- tripal_views_handler_filter_select_string
- This Handler provides a generic select list for any chado field that is a string The select list includes all distinct values for that field.
Code
function extra_options_form(&$form, &$form_state) {
parent::extra_options_form($form, $form_state);
$form['values_form_type'] = array(
'#type' => 'radios',
'#title' => t('Filter Type'),
'#options' => array(
'textfield' => 'Text Field',
'select' => 'Drop-Down Box',
),
'#default_value' => $this->options['values_form_type'],
);
$form['show_all'] = array(
'#type' => 'checkbox',
'#title' => t('Show All'),
'#description' => t('When selected all terms from the controlled vocaulbary used by the table will be shown where the default is to only show those that are used.'),
'#default_value' => $this->options['show_all'],
);
$form['select_multiple'] = array(
'#type' => 'checkbox',
'#title' => t('Select Multiple'),
'#description' => t('Allows more then one option to be selected.'),
'#default_value' => $this->options['select_multiple'],
);
$form['select_optional'] = array(
'#type' => 'checkbox',
'#title' => t('Optional'),
'#description' => t('Adds --Any-- to the available options.'),
'#default_value' => $this->options['select_optional'],
);
$form['max_length'] = array(
'#type' => 'textfield',
'#title' => t('Max Width'),
'#description' => t('Specify the maximum width of the select box'),
'#default_value' => $this->options['max_length'],
);
$form['note'] = array(
'#type' => 'markup',
'#value' => t('<strong><font color="red">Note:</font></strong> If another filter exists for the same table then ' .
'the values shown in the drop box will only include those from rows that are not filtered.'),
);
return $form;
}