Forums Forums Search & Filter Pro dynamic dropdown rely on another dropdown

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #52383

    Is it possible to make dynamic dropdown that shows child taxonomy terms from selected parent taxonomy term on another dropdown?
    There two dropdowns one for parents and one for children.
    When select parent, second dropdown shows only children of parent selected.

    Similar to this topic.
    https://support.searchandfilter.com/forums/topic/ability-to-dynamically-populate-second-filter-dropdown-upon-selection-of-first/

    Trevor
    #52411

    Generally, having one taxonomy with parent and child terms is not a good idea. Instead, you should have two taxonomies (use CPT UI plugin to add taxonomies). Let me give an example. You have a general taxonomy called Category and in this you have States and Cities within them as children.

    Instead, you should have two Custom Taxonomies, one called States and the other called Cities. Then, as long as you have auto count enabled, and hide empty values on the Cities taxonomy, as soon as you select the State, only the Cities from that state are visible.

    Anonymous
    #52702

    I see.
    Thank you.

    Trevor
    #52703

    Let me know how you get on.

    Anonymous
    #52736

    I will use two different taxonomies as you mentioned.
    I suppose the two fields does not need to be parent and child eventually.

    Anonymous
    #53060

    By the way, Is it possible not to update the content(search result) until submit?
    (But dropdown must be dynamic)

    Trevor
    #53063

    Yes, you simply switch off the Submit on user interaction, but leave both auto count switches still on.

    Anonymous
    #53213

    Thank you.

    Trevor
    #53216

    Is this thread resolved and can I close it?

    Anonymous
    #53218

    Yes it’s resolved.

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