I am trying to get two select2 dropdowns to respond to each other based on state /country selection.
i.e. if United States is selected show only the "optgroup" for the states in the other drop down / if Canada is selected - only show provinces / if any other is selected disable and remove required attribute.
So far I found
this code that I am trying to implement in my select2 setup but unfortunately I am having no luck.
It seams to not recognize the
hide/show script for the select2 "optgroup"
? This work if not using a select2 setup so not sure how I can work around.
Any advise is welcome.
Demo on jsfiddle