country-region-selector icon indicating copy to clipboard operation
country-region-selector copied to clipboard

Shortcode detection?

Open hornetnz opened this issue 5 years ago • 1 comments

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?

hornetnz avatar Jan 15 '19 16:01 hornetnz

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?

hornetnz avatar Jan 15 '19 16:01 hornetnz