function views_handler_filter::show_build_group_form

3.x views_handler_filter.inc views_handler_filter::show_build_group_form(&$form, &$form_state)

Shortcut to display the exposed options form.

1 call to views_handler_filter::show_build_group_form()
views_handler_filter::options_form in handlers/views_handler_filter.inc
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.

File

handlers/views_handler_filter.inc, line 345
@todo.

Class

views_handler_filter
Base class for filters.

Code

function show_build_group_form(&$form, &$form_state) {
  if (empty($this->options['is_grouped'])) {
    return;
  }

  $this->build_group_form($form, $form_state);

  // When we click the expose button, we add new gadgets to the form but they
  // have no data in $_POST so their defaults get wiped out. This prevents
  // these defaults from getting wiped out. This setting will only be TRUE
  // during a 2nd pass rerender.
  if (!empty($form_state['force_build_group_options'])) {
    foreach (element_children($form['group_info']) as $id) {
      if (isset($form['group_info'][$id]['#default_value']) && !isset($form['group_info'][$id]['#value'])) {
        $form['group_info'][$id]['#value'] = $form['group_info'][$id]['#default_value'];
      }
    }
  }
}