function views_plugin_exposed_form::options_form in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 7.3 plugins/views_plugin_exposed_form.inc \views_plugin_exposed_form::options_form()
Provide a form to edit options for this plugin.
Overrides views_plugin::options_form
1 call to views_plugin_exposed_form::options_form()
- views_plugin_exposed_form_input_required::options_form in plugins/
views_plugin_exposed_form_input_required.inc - Provide a form to edit options for this plugin.
1 method overrides views_plugin_exposed_form::options_form()
- views_plugin_exposed_form_input_required::options_form in plugins/
views_plugin_exposed_form_input_required.inc - Provide a form to edit options for this plugin.
File
- plugins/
views_plugin_exposed_form.inc, line 46
Class
- views_plugin_exposed_form
- The base plugin to handle exposed filter forms.
Code
function options_form(&$form, &$form_state) {
$form['submit_button'] = array(
'#type' => 'textfield',
'#title' => t('Submit button text'),
'#description' => t('Text to display in the submit button of the exposed form.'),
'#default_value' => $this->options['submit_button'],
'#required' => TRUE,
);
$form['reset_button'] = array(
'#type' => 'checkbox',
'#title' => t('Include reset button'),
'#description' => t('If checked the exposed form will provide a button to reset all the applied exposed filters'),
'#default_value' => $this->options['reset_button'],
);
$form['reset_button_label'] = array(
'#type' => 'textfield',
'#title' => t('Reset button label'),
'#description' => t('Text to display in the reset button of the exposed form.'),
'#default_value' => $this->options['reset_button_label'],
'#required' => TRUE,
'#dependency' => array(
'edit-exposed-form-options-reset-button' => array(
1,
),
),
'#process' => array(
'views_process_dependency',
),
);
$form['exposed_sorts_label'] = array(
'#type' => 'textfield',
'#title' => t('Exposed sorts label'),
'#description' => t('Text to display as the label of the exposed sort select box.'),
'#default_value' => $this->options['exposed_sorts_label'],
'#required' => TRUE,
);
$form['sort_asc_label'] = array(
'#type' => 'textfield',
'#title' => t('Ascending'),
'#description' => t('Text to use when exposed sort is ordered ascending.'),
'#default_value' => $this->options['sort_asc_label'],
'#required' => TRUE,
);
$form['sort_desc_label'] = array(
'#type' => 'textfield',
'#title' => t('Descending'),
'#description' => t('Text to use when exposed sort is ordered descending.'),
'#default_value' => $this->options['sort_desc_label'],
'#required' => TRUE,
);
if (module_exists('ctools')) {
$form['autosubmit'] = array(
'#type' => 'checkbox',
'#title' => t('Autosubmit'),
'#description' => t('Automatically submit the form once an element is changed.'),
'#default_value' => $this->options['autosubmit'],
);
$form['autosubmit_hide'] = array(
'#type' => 'checkbox',
'#title' => t('Hide submit button'),
'#description' => t('Hide submit button if javascript is enabled.'),
'#default_value' => $this->options['autosubmit_hide'],
'#dependency' => array(
'edit-exposed-form-options-autosubmit' => array(
1,
),
),
);
}
}