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 Need to show all options of dynamic dropdown filter on initial page load

Viewing 10 posts - 1 through 10 (of 14 total)
  • Grosvenor
    #42092

    Hi,
    I have a search and filter form with two dropdowns. I have AJAX running on the form, so the first dropdown will reload the results and the second dropdown hides empty results. Basically the second dropdown will only show results pertaining to the first dropdown.

    When the page initially loads, the first dropdown has the option ‘All Items’ selected. However, the second dropdown does NOT show all its options, which is what I’d like it to do. In order for the second dropdown to show all options, I have to first select another item from the first dropdown, then select ‘All Items’ again from the first dropdown. This is what populates the second dropdown with all options.

    Is there any way I can trigger this on page load, so that the second dropdown shows all its options initially when the page loads?

    Trevor Moderator
    #42125

    Do you have a live URL I can see this on? What are the select dropdowns based on (categories, taxonomies)?

    Grosvenor
    #42310

    Hi Trevor,
    Unfortunately I don’t have a live URL, but I can provide additional information.

    The select dropdowns are based on post metadata. Within a blog post form, I have JS/ajax set up with Advanced Custom Fields so that when a user selects a manager from the first dropdown, the second dropdown of employees changes dynamically to reflect employees that specifically report to that selected manager. Because of this setup, Search & Filter automatically filters my dropdowns (if I choose to hide empty results), because the results pertaining to a specific manager will only exist for the employees that are filtered within the blog form, does that make sense?

    So my question is: when I go to my blog on a browser, and Search and Filter displays on the side, I have 2 dropdowns for Manager and Employee. The first dropdown for Manager has “All Items” selected by default. The second dropdown for Employees has “All Items” selected by default as well. However, if I happen to click on the second dropdown to see all Employee options, it shows 1-2 random employees, instead of all employees, which I’m hoping for it to show since the user hasn’t selected a Manager yet.

    When the user selects a Manager from the Search and Filter dropdown, the Employees dropdown is then filtered correctly. If the user then selects “All Items” again from the Manager dropdown, I am able to see ALL Employee options. This is what I’m hoping for on page load. So I’m wondering if there is a way to show all Employees when my blog loads up, or to trigger a Manager selection manually, so that I can see all Employee options on page load?

    Trevor Moderator
    #42323
    This reply has been marked as private.
    Grosvenor
    #42334

    Ah, ok. That would be great. Do you know when the next official version will be coming out, or if you do send the zipped version, do you know if there will be any changes made to it before the release of the next official version? I’m wondering if it’s worth waiting until then, or just installing the new version now.

    Tina

    Grosvenor
    #45812

    Hi,
    I was wondering if you could tell me when the next version of Search and Filter Pro will be released, or to see if you could email me the code that will fix the above described problem. Please let me know.

    Thanks!
    Tina

    Grosvenor
    #45815

    One more thing – I noticed that the employees that are initially shown in the dropdown (on page load) are employees associated with the first Manager in the Manager dropdown (remember how selecting a manager will dynamically populate the employee dropdown). So, that might lend some insight into what is going on here, or confirm that this is the same glitch you have seen and fixed from before.

    Trevor Moderator
    #45842
    This reply has been marked as private.
    Grosvenor
    #45882
    This reply has been marked as private.
    Trevor Moderator
    #45895
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 14 total)

The topic ‘Need to show all options of dynamic dropdown filter on initial page load’ is closed to new replies.