SaneChoiceLtd Posted October 30, 2016 Share Posted October 30, 2016 Dear All, We are a UK based company and a few customers have found signing up a struggle in regards to the telephone numbers. (Please see attached image). In essence, when they put in a standard UK number, it throws a format error. The customers then struggle to find a combination that works. (For example, most UK customers will want to insert 01255 555 555 but its not intuitive for them to insert 44.1255 555 555). Any ideas on how to change this so its more free-text and flexible? Thank you. SCL 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 31, 2016 Share Posted October 31, 2016 take a look at your code and there's additional validation code that isn't present normally... <script type="text/javascript"> //<![CDATA[ jQuery(document).ready(function(){ jQuery("input[name='phonenumber']").blur(function(){ if(!this.value.match(/^(\+?[0-9]{1,3})\.[0-9]+x?[0-9]*$/)) { if(!jQuery("#msg").length) { jQuery("input[name='phonenumber']").after("<div id='msg'></div>"); } jQuery("#msg").html("<span style='color:#DF0101'>Invalid Phone Number Format (ex. 1.4163334444)</span>"); jQuery(".btn-primary").prop("disabled", true); } else { jQuery("#msg").html(""); jQuery(".btn-primary").prop("disabled", false); } }) it seems to be present in whichever template you specify - so I assume it's being added by a hook (possibly OpenSRS Pro ?) - anyway, it's creating the error message, not a WHMCS file. 0 Quote Link to comment Share on other sites More sharing options...
SaneChoiceLtd Posted October 31, 2016 Author Share Posted October 31, 2016 Thank you Brian - Much appreciated. I think you have identified the exact issue. We do use OpenSRS PRO and it may be forcing this validation to ensure that domains can be registered successfully. This means that UK registration sign-up (even when no domain are involved) is also affected. The problem now is that changing these rules will affect domain sign-ip with OpenSRS. Anyone with any tips or experience with this dichotomy then please do let me know! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 31, 2016 Share Posted October 31, 2016 if it's only/mainly a UK user issue, then perhaps modify the error message in /includes/phonecheck.php (not encrypted) and make it more uk centric... Invalid Phone Number Format - if in UK, use (44.1234567890) and perhaps drop an email to OpenSRS support to see if there's any way to improve this in future versions... if you weren't using the Pro module, WHMCS adds the country code to the phone number based on the clients country (with registrations) and so does the work for you, https://forum.whmcs.com/showthread.php?91718-Whmcs-and-phonenumber-in-ORG-contact-(countrycode-not-prefilled-)&p=386202#post386202 but as you can, you can't really remove it because while it might make the form easier, it might also prevent successful registrations. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.