Jump to content
nimafire

States and Countries

Recommended Posts

Hello

come of countries have default states

how can i add state of other countries like Afghanistan, Iraq and ... ?

Share this post


Link to post
Share on other sites
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.

h_Ttw_NB_BQgyx_TJh_v7-0_HA.png

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.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated