Forums Forums Search & Filter Pro Results shown although no filter set, yet

Tagged: ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #20911

    Hi (again)

    I freshly installed the PRO and intuitively created a form.
    So far, looks very promising. I noticed issues when executing AJAX searching using shortcodes for filter and results: (one topic per issue in the forum)
    When loading a search page using shortcodes, all results are displayed even though the user has not set any filters, yet. I would like to start with 0 results when nothing is set

    What am I doing wrong?

    Thanks

    Carsten

    Ross Moderator
    #21114

    Hey again 🙂

    You’re not doing anything wrong, I’m thinking of actually adding this in as an option in the admin, but its really not too difficult to implement.

    What you would need to do is hide the div initially with CSS – which would be either .search-filter-results or #search-filter-results-1234

    Then you would need to display the results after the search has been initiated – you can do this with JS by attaching an event listener to detect when a search has completed:

    http://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/

    $(".searchandfilter").on("sf:ajaxfinish",function(){
    console.log("ajax search complete");
    //so load your lightbox or JS scripts here again
    });

    Thanks

    Anonymous
    #21126

    Hmm…..we try to avoid customisations, so we would really appreciate, that we could controll this either globally or by from-basis. Imagine Google would show all results before you started typing……

    Ross Moderator
    #21130

    True, in that case you will have to wait for the option where no query is even performed until user interaction.

    In some scenarios it would be an advantage to have extra searchable content, rather than empty space.

    Anonymous
    #21177

    I agree, both approaches are useful and in fact we need both:
    A) Global search form –>Show nothing initially
    B) News Corner –> Shown all news, let visitor drill down by category
    So, a switch per FORM would be most appropriate and I would believe it would not be so hard for the developers to add this extra option that is handled in a small IF in the rendering…..

    Ross Moderator
    #21198

    You’re right its not hard at all 😉 Will be looking to add this in!

Viewing 6 posts - 1 through 6 (of 6 total)