cenourinha Posted September 19, 2019 Share Posted September 19, 2019 I see that you have some arrays with the states of specific countries hardcoded on the file "assets/js/StatesDropdown.js". Would it possible for WHMCS to read that information from a separated file (for example resources/country/dist.countries-states.json) and allow us to create a /resources/country/countries-states.json with custom States for each country? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 20, 2019 Share Posted September 20, 2019 21 hours ago, cenourinha said: Would it possible for WHMCS to read that information from a separated file (for example resources/country/dist.countries-states.json) and allow us to create a /resources/country/countries-states.json with custom States for each country? I dislike "is it possible" questions as the answer is almost always yes in theory - it's just whether it's worth the effort. 🙂 I can't see an obvious way to do it without editing statesdropdown.js to add the custom code to read the external array - and if you're going to do that, you might as well just edit the arrays directly... yeah I know they'll get overwritten by an update, and there will have been 4 of them in the last 4 weeks, but after next week, I doubt there will be another release this year... so just a case of keeping your custom file backed up (or at least the arrays part of it). don't get me wrong, I see your idea as a good one, and it's been mentioned here previously since WHMCS introduced customising the countries list, but I don't even think anyone has made a formal feature request for it - not that they would matter, as there are many requests to add the states/counties within country x to the array, which even though they would just be a copy & paste, and a quick verification check, haven't been completed. 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.