Please provide me a code for auto fill country in form.
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
I want similar to below link
http://phppot.com/demo/jquery-ajax-autocomplete-country-example/
Thank you,
Martina Maruche
Executive IT
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.
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
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
Hey @Martina ,
We have a brand new, complete solution for adding Country Codes and Flags to Unbounce! With this solution, you can easily setup autofill country so that when someone provides their phone number in your Unbounce page, it’ll easily collect country data!
FREE Version:
PRO Powerful Version:
https://www.grooic.com/cfu-unbounce
👀 Check Out the Live Preview Here:
https://www.grooic.com/cfu-preview/
🤝 If you have any questions or need support, feel free to reach out to us on WhatsApp: +1 917 900 3111
Thanks,
You can usually set the country field to autofill using JavaScript. If you have access to the form's code, you can use a library like jQuery to grab the user's location from their IP address and populate the field automatically.
Hey @Martina ,
We have a brand new, complete solution for adding Country Codes and Flags to Unbounce! With this solution, you can easily setup autofill country so that when someone provides their phone number in your Unbounce page, it’ll easily collect country data!
FREE Version:
PRO Powerful Version:
https://www.grooic.com/cfu-unbounce
Check Out the Live Preview Here:
https://www.grooic.com/cfu-preview/
If you have any questions or need support, feel free to reach out to us on WhatsApp: +1 917 900 3111
Thanks,
Reply
Log in to the Unbounce Community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.