I have multi-select taxonomy field A. When one or more values are selected in A, I want to restrict the choices available in taxonomy field B.

So for example:

Two Taxonomies called

country - "USA", "Russia", "China"

city - "Chicago", "Moscow", "Beijing"

I want when user in taxonomy "country" choose value "USA" after that in taxonomy "city" show only "chicago".

Is it possible? And how can I do this using a JavaScript or jquery

  • 1
    Can you post the code for your multi-select? – Pim Oct 2 '18 at 14:25

without seeing any code you could try the following

$('#IDofYourCountrySelectField').on('change', function() {
  //Code to update option values of city select field


$('#IDofYourCountrySelectField').change(function() {
  //Code to update option values of city select field
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.