You are here

function views_filters_selective_form_views_ui_config_item_form_alter in Views Hacks 6

Implementation of hook_form_FORMID_alter() for views_ui_config_item_form.

File

views_filters_selective/views_filters_selective.module, line 282

Code

function views_filters_selective_form_views_ui_config_item_form_alter(&$form, $form_state) {
  if ('2' != substr(views_api_version(), 0, 1)) {

    // Only continue for Views 2.x
    return;
  }
  if (empty($form['options']['expose'])) {
    return;
  }

  // Build form elements for the right side of the exposed filter form
  $right = views_filters_selective_form_views_ui_config_item_form_alter_do($form_state['handler'], $form_state['handler']->options['expose'], $form_state['view'], 'edit-options-expose-vfs-selective');
  $expose = $form['options']['expose'];
  $first_chunk = array_splice($expose, 0, array_search('end_checkboxes', array_keys($expose)));
  $form['options']['expose'] = array_merge($first_chunk, $right, $expose);
}