[WHMCS] State Drop Down Menu

By default the drop down menu “State” will only show relevant results for the web hosting companies default country (in most cases: United States). Only when a client changes the country drop down menu does the State field update with relevant results to them. As the country field is located AFTER the state drop down menu, it can cause problems.

For example, if a UK client was to signup to a US based hosting provider they would see the State drop down menu BEFORE the country drop down menu, as WHMCS doesn’t automatically detect the users country that state drop down menu will only show US states causing the client to either: Leave, pick a random option with the chance of forgetting to update it later – Why put your client through potential frustration?

To fix this we will remove the drop down menu and replace it with a standard text box. This will make it easier for you if you have an international client base.

  1. Login your cPanel account and visit your file manager or login using your preferred FTP client
  2. Go to your WHMCS -> Templates -> Orderforms -> *Choose your set order form*
  3. Find & open the file “viewcart.tpl”
  4. Locate & delete the line (In an unmodified viewcart.tpl this is usually on line 2)
    <script type=”text/javascript” src=”includes/jscript/statesdropdown.js”></script>
  5. Save & close viewcart.tpl
  6. Go to WHMCS -> Templates -> *Choose your set WHMCS template*
  7. Find & open the file “clientregister.tpl”
  8. Locate & delete the line (In an unmodified clientregister.tpl this is usually on line 6)
    <script type=”text/javascript” src=”includes/jscript/statesdropdown.js”></script>
  9. Save & close clientregister.tpl

Your drop down menus should now be replaced with text boxes resolving this issue.

Looking for quality web hosting? Look no further than Arvixe Web Hosting!

Tags: , , , | Posted under WHMCS | RSS 2.0

Leave a Reply

Your email address will not be published. Required fields are marked *


9 + 4 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>