cluster Posted September 13, 2017 Share Posted September 13, 2017 (edited) WHMCS latest modern theme how can I make the state field in client area (clientareadetails.tpl) optional? it is already marked as an optional field in the whmcs setup but in client area it does not work .. still required for any changes also, the phone number field in clöient area do not allow international prefixes w/ + f.ex. +001 45454545454 the client needs to enter 001 45454545454 but the above format is required by my registrar Edited September 13, 2017 by cluster 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 13, 2017 Share Posted September 13, 2017 also, the phone number field in clöient area do not allow international prefixes w/ + f.ex. +001 45454545454 the client needs to enter 001 45454545454 but the above format is required by my registrar WHMCS automatically add international format for phone numbers: https://developers.whmcs.com/api-reference/getclientsdetails/ "client[phonenumberformatted]": "+44.1234567890", 0 Quote Link to comment Share on other sites More sharing options...
AzeDK Posted June 3, 2021 Share Posted June 3, 2021 (edited) On 9/13/2017 at 5:58 PM, cluster said: how can I make the state field in client area (clientareadetails.tpl) optional? it is already marked as an optional field in the whmcs setup but in client area it does not work .. still required for any changes It has not been working since first release, and still not working now. Its very frustrating, and misleading to be able to set the state field optional in WHMCS > System Settings > General Settings > Other > Optional Client Profile Fields, but the clientarea details pages and order pages still enforce the field as required for most countries. The only solution we found was to hardcode edit the inclusion of StatesDropdown.js in the /templates/twenty-one/clientareadetails.tpl file to the following (I suggest making your own Child Theme, to keep changes after WHMCS updates): <script type="text/javascript" src="{$BASE_PATH_JS}/StatesDropdown2.js"></script> And then copy the /assets/js/StatesDropdown.js file to StatesDropdown2.js and add our own country code "states": states['DK'] = ["","Hovedstaden","Sjælland","Nordjylland","Midtjylland","Syddanmark","end"]; Leaving the first option empty, for clients not wishing to bloat their invoice details with this unwanted state field. Please give some love for this feature request Allow State/Region Overrides Edited June 3, 2021 by AzeDK 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.