aquiss Posted November 16, 2017 Share Posted November 16, 2017 Can anyone else confirm that the new "international phone number automatic formatting" introduced into 7.4.0, even when disabled from within the new option, is still changing client profile contact numbers to start with the international format (in our case +44.)? Link to comment Share on other sites More sharing options...
brian! Posted November 16, 2017 Share Posted November 16, 2017 3 hours ago, aquiss said: Can anyone else confirm that the new "international phone number automatic formatting" introduced into 7.4.0, even when disabled from within the new option, is still changing client profile contact numbers to start with the international format (in our case +44.)? yes - but if the feature is disabled, and you update a telephone number in the admin area, it stores the phone number exactly as you entered it into the database table (even though it will still show the +44 prefix in the profile); if you update a phone number while the feature is enabled, it will add +44 (or whatever) to the phone number when updating the database table. Link to comment Share on other sites More sharing options...
aquiss Posted November 16, 2017 Author Share Posted November 16, 2017 1 minute ago, brian! said: yes - but if the feature is disabled, and you update a telephone number in the admin area, it stores the phone number exactly as you entered it into the database table (even though it will still show the +44 prefix in the profile); if you update a phone number while the feature is enabled, it will add +44 (or whatever) to the phone number when updating the database table. Thanks for the confirmation of how it works, bit confusing, but at least I know. Link to comment Share on other sites More sharing options...
brian! Posted November 16, 2017 Share Posted November 16, 2017 3 minutes ago, aquiss said: Thanks for the confirmation of how it works, bit confusing, but at least I know. yeah, at first reading, the documentation was confusing on this - it was only by changing a phone number in the admin area and spotting the changes in the database table, that I could figure out what the differences were. Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted November 17, 2017 Share Posted November 17, 2017 Thanks for your feedback on the documentation being confusing @aquiss & @brian! i've flagged this with the docs team Link to comment Share on other sites More sharing options...
Bertie Posted November 28, 2017 Share Posted November 28, 2017 (edited) Sorry for hijacking the thread but any chance you can get the nice country code UI for a custom field? As we have an extra field for a mobile number. Unless WHMCS will add a mobile number option in the future I suppose. Edited November 28, 2017 by Bertie Link to comment Share on other sites More sharing options...
brian! Posted November 28, 2017 Share Posted November 28, 2017 3 hours ago, Bertie said: Sorry for hijacking the thread but any chance you can get the nice country code UI for a custom field? As we have an extra field for a mobile number. Unless WHMCS will add a mobile number option in the future I suppose. it looks like the jQuery code for this is in /templates/six/js/scripts.min.js - which you could edit in scripts.js and then minify it... how simple it would be to add/copy the functionality to a customfield, I don't know... it certainly looks doable. if it helps, perhaps you might want to take a look at the jQuery source code used for this - WHMCS didn't write it themselves (which probably explains why it works and looks good lol)... https://github.com/jackocnr/intl-tel-input Quote A jQuery plugin for entering and validating international telephone numbers. It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods. if you can't figure out how to duplicate the existing WHMCS code, i'd be tempted to just start from scratch and use the above plugin solely for your customfield... I might be tempted to have a play with this at the weekend - though if you do it successfully sooner, do post the solution as it will allow me to spend time on other projects! 1 Link to comment Share on other sites More sharing options...
Recommended Posts