1

I am having a registration form where user will choose country and for phone number field they can choose country code, I am using countries gem for list out the countries and intlTelInput plugin for phone number field but the countries is different at each plugins, Is there any good option to have both fields same value

Aarthi
  • 1,451
  • 15
  • 39
  • 2
    In the `intl-tel-input` plugin, it is stated that *any options that take country codes should be ISO 3166-1 alpha-2 codes*, and in the `hexorx/countries` gem it is stated that you can use `ISO3166::Country.find_country_by_alpha2('us')`. Here is how to map the countries. – MrYoshiji Apr 13 '18 at 15:21
  • Would that be good to have countries as constant and use that in dropdown – Aarthi Apr 13 '18 at 16:42

0 Answers0