country-region-selector
country-region-selector copied to clipboard
Shortcode detection?
Our data can be imported from other sources, some of which use shortcodes and others dont. We were originally 'detecting' shortcodes if it was >= 2 characters, but then noticed other countries have 3-char codes...and then other regions full-names that are only 3 chars. Do you know the best method to detect if saved data is shortcode?
Also, is there a way to read the country/region array to find a match on the saved value via JS if there aren't CRS form fields loaded on the page?