Jump to content

Select State in DropDown List when Register ??


Guest shoesholic.com.au

Recommended Posts

Guest shoesholic.com.au

hi there !

in CC Admin, I have removed all the Countries, leaving just Australia.

and also in CC Admin, I have added the 8 States for Australia (and can see these 8 states in MyPhpAdmin alright).

But the problem is that when a customer registers, they cannot select which State they are in using a drop-down list just like when they select the Country.

have anyone been able to do that?

there have been 3-4 people asking for the same help but never really been answered.

any help would be greatly appreciated. Thanks alot !!! Cheers!

Davo

Link to comment
Share on other sites

Guest shoesholic.com.au

ok guys i found the solution myself.....

just need to modify reg.inc.php and reg.tpl.....

wherever there are codes for displaying "Countries" data from DB, copy it and replace the code for displaying "Counties" with that.

Remember to change the attribute "printable_name" for Countries with "name" for Counties, which is the attribute of counties in the DB.

The same mean should apply to profile.tpl too if you want to be consistent, this is the page where a customer want to change his/her details such as address and phone etc.

hope this helps the other 3-4 people that wants exactly the same mod.

cheers

Davo

hi there !

in CC Admin, I have removed all the Countries, leaving just Australia.

and also in CC Admin, I have added the 8 States for Australia (and can see these 8 states in MyPhpAdmin alright).

But the problem is that when a customer registers, they cannot select which State they are in using a drop-down list just like when they select the Country.

have anyone been able to do that?

there have been 3-4 people asking for the same help but never really been answered.

any help would be greatly appreciated. Thanks alot !!! Cheers!

Davo

Link to comment
Share on other sites

  • 6 months later...
Guest Ronald Bollat

Your solution worked very well, did you ever find a way to filter the Counties for the specific Country selected? What I mean is if you select United States, only to get US States. Or to sort all of them in an ascending way, regardless of the Country they belog to?

Thanks

Link to comment
Share on other sites

  • 5 months later...
Guest jrobertblack

couldnt really get your way to work. this is a simple way that I did-

open - styleTemplates/content/reg.tpl

replace this code -

<input name="county" type="text" class="textbox" id="county" size="16" value="{VAL_COUNTY}" tabindex="10" />




with this code -




<select name="county" tabindex="10">

  <option value="Alabama">Alabama</option>

  <option value="Alaska">Alaska</option>

  <option value="Arizona">Arizona</option>

  <option value="Arkansas">Arkansas</option>

  <option value="California">California</option>

  <option value="Colorado">Colorado</option>

  <option value="Connecticut">Connecticut</option>

  <option value="Delaware">Delaware</option>

  <option value="District of Columbia">District of Columbia</option>

  <option value="Florida">Florida</option>

  <option value="Georgia">Georgia</option>

  <option value="Hawaii">Hawaii</option>

  <option value="Idaho">Idaho</option>

  <option value="Illinois">Illinois</option>

  <option value="Indiana">Indiana</option>

  <option value="Iowa">Iowa</option>

  <option value="Kansas">Kansas</option>

  <option value="Kentucky">Kentucky</option>

  <option value="Louisiana">Louisiana</option>

  <option value="Maine">Maine</option>

  <option value="Maryland">Maryland</option>

  <option value="Massachusetts">Massachusetts</option>

  <option value="Michigan">Michigan</option>

  <option value="Minnesota">Minnesota</option>

  <option value="Mississippi">Mississippi</option>

  <option value="Missouri">Missouri</option>

  <option value="Montana">Montana</option>

  <option value="Nebraska">Nebraska</option>

  <option value="Nevada">Nevada</option>

  <option value="New Hampshire">New Hampshire</option>

  <option value="New Jersey">New Jersey</option>

  <option value="New Mexico">New Mexico</option>

  <option value="New York">New York</option>

  <option value="North Carolina">North Carolina</option>

  <option value="North Dakota">North Dakota</option>

  <option value="Ohio">Ohio</option>

  <option value="Oklahoma">Oklahoma</option>

  <option value="Oregon">Oregon</option>

  <option value="Pennsylvania">Pennsylvania</option>

  <option value="Rhode Island">Rhode Island</option>

  <option value="South Carolina">South Carolina</option>

  <option value="South Dakota">South Dakota</option>

  <option value="Tennessee">Tennessee</option>

  <option value="Texas">Texas</option>

  <option value="Utah">Utah</option>

  <option value="Vermont">Vermont</option>

  <option value="Virginia">Virginia</option>

  <option value="Washington">Washington</option>

  <option value="West Virginia">West Virginia</option>

  <option value="Wisconsin">Wisconsin</option>

  <option value="Wyoming">Wyoming</option>

</select>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...