ZIP FORMAT BY COUNTRY & PHONE PREFIX JSON (Forms)

Desription script

This code will allow to predefine the format of postal code, and the format and the international prefix of the telephone number of a customer depending on the country in which it resides.

This code will improve the user experience by avoiding making bad input on important form fields.

Administrator will have no problem to perform:

  • Accurate statistics.
  • Be sure to have data to global standard (ISO).
  • Display phone numbers formatted for sending SMS .
  • The address records according to standard.

Example with function getPhone()

  1. Country = CA – Format : 999-999-9999
    • International : +1 999-999-9999
    • National : 999-999-9999
    • Cellular : 19999999999
  2. Country = FR – Format : (0)9 99 99 99 99
    • International : +33 9 99 99 99 99
    • National : 09 99 99 99 99
    • Cellular : 33999999999
  3. Country = PT – Format : 999 999 999
    • International : +351 999 999 999
    • National : 999 999 999
    • Cellular : 351999999999

Zip file contains

  • example smple
  • example with sms sender ( api tm4b.com )
  • json request
  • file ajax.php
  • file post.php
  • File country .csv
  • Documentation -EN -FR

Possible to easily enhance, or connect easily to your code example for rostering.

Download ZIP FORMAT BY COUNTRY & PHONE PREFIX JSON (Forms)

Leave a Reply

Your email address will not be published. Required fields are marked *