Question

Dynamic default country code for phone number field

  • 7 February 2021
  • 2 replies
  • 946 views

Userlevel 1
Badge

Presently, the phone number field has an option to set one of the countries as default and it works in most use cases if the majority audience is from a local geaography.

The User Experience can be improved if the user can have the default country code can be set dynamically from the IP Address. This would not require to store any IP Address or location into processing on server and can be done entirely client side so it would not affect any existing cookie or privacy policy. 

I personally have been filling forms at hackathon and I have to change country code every time I fill. It would be awesome if Typeform could fill country code for me from my IP location


2 replies

Userlevel 7
Badge +6

@DesignrKnight - this is from a user, not a Typeform employee

As someone who travelled a lot for work, and is likely to do so again once the restrictions are lifted, using the IP address to base the default country code would be a pain in the proverbial. 

This would need to be confirmed by someone with deeper knowledge of the Typeform APIs but it should be possible to capture the IP address of the ‘user’, call out to the API and look up the IP-based country code, and return that to a question that says “It looks like you are in country XXX and the country code for the phone number should be: YY. If this is not the case, please change it”.. 

just my thoughts for a Sunday afternoon

 

 

Badge +5

I guess if we are talking about APis I need to call out @Nordin  and @picsoung . Hopefully they can give their view on this suggestion. Thanks for posting it by the way! 

Reply