Hi!

I'm using this great module to sort and remove unused taxonomy terms within a variety of categories from a list of different travels to a specific country.

It works very well on my exposed filter, but I don't seem to be able to change the default option from All to a specific category in my view? Normally this is easy with exposed filters, but with Selective filter the option for the default value isn't there?

Any solution to this problem? I'd be happy to accept some custom code / hook to implement, but maybe I just can't find this option in the Views interface?

Regards,
Mattias

Comments

mattiasdk’s picture

Issue summary: View changes
leofishman’s picture

Hi,

I need the same funcionality, could you find a way to set a default value?

thanks

david_garcia’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Category: Task » Support request
tko’s picture

hook_form_alter with $form['FIELD']['#default_value'] sadly has has no effect. Is there a way to force the default value?

proweb.ua’s picture

same problem

proweb.ua’s picture

function custom_module_views_pre_build(&$view) {
  if (isset($view->display[$view->current_display]->handler->handlers['filter']['field_name_value_selective'])) {
    $view->display[$view->current_display]->handler->handlers['filter']['field_name_value_selective']->value = 'value';
  }
  return;
}
markusd1984’s picture

Category: Support request » Feature request

thanks @proweb.ua worked a treat.

This would be nice to have a setting in the views filter with a drop-down or check box to select the default value.