Skip Navigation

[Resolved] display dropdown box (City of Country) when a certain Country is selected

This thread is resolved. Here is a description of the problem and solution.

Problem: I have a custom search View with filters of Country and City. When the User selects a Country, I would like to show only the Cities in that Country in the City filter.

Solution: You can configure your custom search View filters to include only the available options. For an example, see our Real Estate demo site at http://discover-wp.com

Relevant Documentation: https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/

This support ticket is created 7 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Bernadette Docuyanan 7 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#554226

Tell us what you are trying to do? display dropdown when a certain country is selected, each country has own cities, cannot make it work

Is there any documentation that you are following?

Is there a similar example that we can see? ---- https://toolset.com/forums/topic/search-sub-filters/, is there another solution ?

What is the link to your site ---- hidden link

#554426

Hi, I assume you would like to display these drop-down boxes as part of a View filter, is that correct?
If so, you can set up your filters to show only the available options for each input.

Please check out our demo site "Real Estate" at http://discover-wp.com/site-templates/ for a real-world example of this. On the home page, you will see "City" and "State" fields that will closely correspond with your "City" and "Country". City is a child of State, and House is a child of City.

If you do not have a demo account yet, you can set up your own demo account and see how these search fields are implemented in the back-end of the site. Whenever a filter input is updated, we automatically update the options in all the other inputs so that only the available options are displayed.

More information about this Advanced Setting for Custom Search here:
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/

Please let me know if you have additional questions about this approach.

#555984

Thanks Christian.. I have finally configured it..

#1189278

Hi..
I would like to open this thread again... is this solution still applicable to the present Toolset version? because currenlty, there is a new relationship in the menu and I had created the relation ship between Country and Location..Resort and Location but I cannot make it work..it doesnt display the Country and the LOcation.. I need to have the location auto display when a country is selected...

right now, I'm just using the taxonomy/category to display/filter the results (did not add country/location as separate filters)

Thanks