Auto-Adding Country Code to Phone Numbers in Forms

Is it possible to automatically add the international country code when entering a phone number in the registration form?

Nope, currently it’s just a text field.

It would also need to be some kind of UI widget that:

  • detects existing country codes and displays the correct flag
  • put the right country code in front of the phone number when selecting it via dropdown or whatever
  • possibly detect whether people add a leading 0 to a number where it should not be when there’s a country code