nimafire Posted February 27, 2018 Share Posted February 27, 2018 Hello come of countries have default states how can i add state of other countries like Afghanistan, Iraq and ... ? Link to comment Share on other sites More sharing options...
brian! Posted February 27, 2018 Share Posted February 27, 2018 4 hours ago, nimafire said: some countries have default states - how can i add state of other countries like Afghanistan, Iraq and ... ? you would need to manually edit /assets/js/StatesDropdown.js and add your counties/states/provinces etc in there e.g., for Afghanistan... var states = new Array(); states['AF'] = ["Badakhshan","Badghis","Baghlan","Balkh","Bamyan","Daykundi","Farah","Faryab","Ghazni","Ghor","Helmand","Herat","Jowzjan","Kabul","Kandahar","Kapisa","Khost","Kunar","Kunduz","Laghman","Logar","Maidan Wardak","Nangarhar","Nimruz","Nuristan","Paktia","Paktika","Panjshir","Parwan","Samangan","Sar-e Pol","Takhar","Urozgan","Zabul","end"]; states['AU'] = ["Australian Capital Territory","New South Wales","Northern Territory","Queensland","South Australia","Tasmania","Victoria","Western Australia","end"]; the order you add the countries in shouldn't matter, but obviously the list within each will. I would imagine that WHMCS would consider this a core file, and therefore would be overwritten by the automatic updater - so keep a copy of the file backed up for when that occurs... unlike countries, there's currently no similar method built-in to add additional states that won't get overwritten. 2 Link to comment Share on other sites More sharing options...
Recommended Posts