Skip Navigation

[Resolved] Need to have a user select a continent, and then have them select a country

This support ticket is created 2 years, 8 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#2358251

Tell us what you are trying to do?

I want my users to first select a continent, and then show them a list of countries inside that continent to choose from.

Is there any documentation that you are following?

No. altough you state that conditional fields can operate taxonomies, there are no such options to do so.

Is there a similar example that we can see?

should be like a marketplace bound to a continent and country.

What is the link to your site?

Not showing much as this aint working and without its useless.
hidden link

#2358923

Hi,

Thank you for contacting us and I'd be happy to assist.

Since it is not possible to create a link between the terms in the two taxonomies, you can use post types and post relationships for this setup.

You'll need two new custom post types:

- Continents
- Countries

These post types can be linked together using the post-relationships:

- Continents -> Countries
A one-to-many relationship where one continent can be linked to many countries.

- Countries -> Listings
A one-to-many relationship where one country can be linked to many listings.

When creating a new listing using the Toolset Form from the front-end, a user will just select the related "Country" and it will indirectly link to the relevant "Continent" as well.

In the views search form, the user will have the option to select a "Continent" first and then its related "Countries" will automatically become available in the "Country" field.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar