public function buildOptionsForm(&$form, &$form_state) { parent::buildOptionsForm($form, $form_state); // allow + for or, , for and $form['break_phrase'] = array('#type' => 'checkbox', '#title' => t('Allow multiple values'), '#description' => t('If selected, users can enter multiple values in the form of 1+2+3 (for OR) or 1,2,3 (for AND).'), '#default_value' => !empty($this->options['break_phrase']), '#fieldset' => 'more'); $form['not'] = array('#type' => 'checkbox', '#title' => t('Exclude'), '#description' => t('If selected, the numbers entered for the filter will be excluded rather than limiting the view.'), '#default_value' => !empty($this->options['not']), '#fieldset' => 'more'); }
/** * Override buildOptionsForm() so that only the relevant options * are displayed to the user. */ public function buildOptionsForm(&$form, &$form_state) { parent::buildOptionsForm($form, $form_state); $form['must_not_be'] = array('#type' => 'checkbox', '#title' => t('Fail basic validation if any argument is given'), '#default_value' => !empty($this->options['must_not_be']), '#description' => t('By checking this field, you can use this to make sure views with more arguments than necessary fail validation.'), '#fieldset' => 'more'); unset($form['exception']); }