I use the function of Geonames to locate countries where we connect. And my problem is that I have to fill in a phone number field at the beginning with a telephone code, this telephone code depends of the country. In my solution, the code works if I select a country, but when the page is initially charged (detected by Geonames country), the country is displayed but I do not get the phone code.
What is the solution?
Example:
country = FRANCE
telephone code = +33
In my code :
country = FRANCE
telephone code = +93 (First country in the list and not that of FRANCE !!)