0

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
  • 1
    Can you post the code for your multi-select?
    – Pim
    Oct 2, 2018 at 14:25

1 Answer 1

0

without seeing any code you could try the following

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

or

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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