Skip Navigation

[Resolved] Set up taxonomies with restricted select options

This support ticket is created 6 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
- 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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by Ben 6 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1122772

Ben

Is it possible to set up a custom taxonomy to behave in the way highlighted below. I am sure there is a word for this type of relationship/taxonomy but I can't remember it!

Say I have a CPT called People. I could use taxonomies to categorise different locations, for example a birth place and a current place for each Person. I would like to identify the country and the city.

I could set up a Custom Taxonomy. And have the countries as Parents and the cities as children. But this means someone could select a country of United Kingdom, but also a city like Paris.

Is there any way to stop this happening? So only Children under a selected Parent can be selected?

I hope the above makes sense. If you need any more information, please let me know.

#1123472

Hello,

There isn't such kind of built-in feature within Toolset, you might consider custom codes, for example, here is a similar thread:
https://toolset.com/forums/topic/cred-form-select-select2-disable-parent-taxonomy-field/

#1123628

Ben

Thank you Luo Yang.

I think I will use CPTs and different Relationships for this as it seems a lot easier to achieve that way.

Thank you for your help anyway!