Support Forums

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

Forums Forums Search & Filter Pro Dropdown search for taxonomy showing empty terms

Viewing 8 posts - 1 through 8 (of 8 total)
  • SDCO Partners
    #232662

    Hi –

    I have the settings for my drop-down search set up to Hide Empty Terms. However, when I open the dropdown there are terms that are returning no results. I have updated the plugin to the latest version (2.5.0) and I even went in and updated the search and rebuilt the cache, but it is still returning empty terms in the dropdown. You can see an example here when you select (at the bottom of the page) Publishing & Broadcasting from the dropdown: https://sprouthouseagency.com/results

    Let me know if I need to create you a back end login as well to look at the settings. I appreciate any help you can provide on this matter.

    Thanks!

    Trevor Moderator
    #232680

    Is Auto Count (both settings) also ON?

    SDCO Partners
    #232916

    Hi Trevor — Thank you. When I turned this on, it did work. It removed the options that did not have results. However, it also removed the Combobox Script for select2 upon doing the first selection from the drop-down. I have turned it back off on the live site because I do not want the styles to be gone for the live site. However, it is definitely removing that upon searching the first time which makes it look pretty terrible. Do you have a solution for this? Thank you!

    Trevor Moderator
    #232926
    This reply has been marked as private.
    SDCO Partners
    #232946
    This reply has been marked as private.
    Trevor Moderator
    #232956

    If that doesn’t happen if you turn Ajax OFF, AND if you apply those styles using JavaScript (jQuery), then you need to apply them after our Ajax triggers, which can happen after 2 events;

    sf:ajaxformfinish -> after Auto Count runs to update numbers
    sf:ajaxfinish -> after the form submits

    Sample snippet:

    <script type="text/javascript">
    	$(function(){
    		$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    		    console.log("ajax finish");
    		    // your code
    		});
    	}(jQuery));
    	$(function(){
    		$(document).on("sf:ajaxformfinish", ".searchandfilter", function(){
    			console.log("ajax complete");
    			// your code
    		});
    	}(jQuery));
    </script>
    SDCO Partners
    #232973

    Hi Trevor — Thank you for your help, I think at this time it is becoming a bit more work than we would like to do to get this back running properly. Such a bummer that the plugin doesn’t work the way it seems like it should based on the settings. I have just set up a jQuery function after the ajax runs for if it returns no results to put a message on the screen. Thanks for your help though!

    Trevor Moderator
    #232976

    Thanks for getting back to me. I will close this thread for now.

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

The topic ‘Dropdown search for taxonomy showing empty terms’ is closed to new replies.