Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Filter default values

Viewing 3 posts - 1 through 3 (of 3 total)
  • Jens Vandeput
    #126682

    Hi,

    I have 3 filter dropdowns (categories, tags and a custom taxonomy).
    It’s working fine, but I wonder if it’s possible to select values of those three dropdowns based on a session I made?
    Each user has it’s own preferences in it’s profile, based on that, they should have the search result filtered when they visit the page. However, they should be able to change the filters afterwards.

    Anyone has a clue how to do it?

    Thanks!

    Trevor Moderator
    #126691

    You might be able to do it with custom coding using our Edit Query Arguments filter. But I would not know how. There are examples users have posted in this forum that they have written.

    Jens Vandeput
    #126699

    Thanks for the link.

    I fixed it the following way:

    function filter_function_name($input_object, $sfid) {
      if($input_object['name']=='xxx') {
        $input_object['defaults'] = array("yyy");
      }
      return $input_object;
    }
    add_filter('sf_input_object_pre', 'filter_function_name', 10, 2);
Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Filter default values’ is closed to new replies.