Anyone know how to autofill country in a form?


#1

Please provide me a code for auto fill country in form.


#2

Hi @Martina,

As you’ve mentioned, autofilling the visitor’s country requires some custom coding but it also requires an API service that can translate the visitor’s IP data and provide back the country.

Depending on the API you use, the implementation would be slightly different.

Best,
Hristian


#3

I want similar to below link

http://phppot.com/demo/jquery-ajax-autocomplete-country-example/

Thank you,

Martina Maruche

Executive IT


#4

The example you’ve provided shows Autocomplete which is different than Autofill.

Either way, you would need a developer to set it up as this would be a custom script.


#5

I am a developer so u can explain me (Know php, html, ajax etc).

I just want to know how i can rewrite id=“search-box” though I have name=“gaCountry”

Thank you,

Martina Maruche

Executive IT


#6

Hi Martina,

Since you are a developer, you are going to have to adjust your script to use the field you have on your form.

Each field in your form has its own ID. If in your case it’s gaCountry use that in the script.

Best,
Hristian