I've created custom filter with checkbox exposed form in my module:

class my_module_helper_handler_filter_timetracking_children extends views_handler_filter {

   * Clear query alter
function query() {
value_form(&$form, &$form_state) {
$form['value'] = array(
'#type' => 'checkbox',
'#title' => t('Show subtasks'),
'#default_value' => isset($this->value) ? $this->value : NULL,


When by default in views UI settings it's dissabled it works fine. But when It's enabled by default in views UI id doesn't respect default value and $_GET parameter.

I can't understand this strange behaviour of single on/off checkox in exposed filters in view.

I tried also to use '#attributes' => array('checked'=>'checked') but filter didn't work correct.


dawehner’s picture

Category:bug» support
Status:Active» Fixed

If you want to use checkboxes, maybe checkout the better_exposed_filters module.

See http://drupal.org/node/577682#comment-2043986

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.