Flexible/International Phone Formatting Options

Request to include UK based formatting options:

  • Post Codes in xxx xxx format
  • Phone numbers to allow for (xxxx) xxx xxx format
  • A fairly straight forward change but one that would improve usage by UK based teams.

    Australian numbers also.  

    I have clients that would be quite offended if I have to make them use US formats.  

    Thanks

    This would be of great value to my application also. Please add this function to knack!

    great idea ... 

    I support this but even better if the format was allowed to be defined flexibly so as to apply internationally. Typical preferred formats in the UK are (xxxxx) xxxxxx but some use xxxxxx xxx xxx and some use full +xx xxxx xxxxxx.

    There’s something on roadmap in this matter? Custom formatting is a must. Not only phone numbers, but other type of fields too, like brazilian specific stuff:

    • Phone numbers: (99) 9999-9999 (fixed numbers) or (99) 99999-9999 (cell numbers)
    • CPF: format 999.999.999-99
    • CNPJ: format 99.999.999/9999-99
    • CEP (post code): format 99999-999

    Solution: use JavaScript to customize input. :smiley:

    LazyLoad.js([
        'https://cdnjs.cloudflare.com/ajax/libs/cleave.js/1.6.0/cleave.min.js', 
        'https://cdnjs.cloudflare.com/ajax/libs/cleave.js/1.6.0/addons/cleave-phone.br.js'
      ], function () {
        console.log('js loaded!');
    });
    
    $(document).on('knack-scene-render.any', function(event, scene) {
      var cleave = new Cleave('#field_48', {
          phone: true,
          phoneRegionCode: 'BR'
      });
    });
    

    PS: Cleave.JS have a lot ready to use solutions, including date formatting and so on.

    1 Like

    Looking to get UK phone formats or the ability to set our own format.

    UK: (NNNNN) NNNNNN or (NNNNN) NNN NNN