Knowledgebase: Form Code & Javascript
How to create a dropdown list that displays one value but passes another
Posted by Matt Marler on 24 March 2010 11:58 AM
Cart32 now has the ability to display a dropdown box of items that can have a name that is different from the value it passes. Dropdown boxes are most commonly used to populate the state or country fields in the billing and shipping tabs in the cart.

For example, if you want a dropdown box of all the countries your store will ship to, you can have a dropdown list that has the choices "United States, Canada, Mexico". However the box will actually pass the values "US,CA,MX". This is useful if you're using real-time shipping calculations, because you need to pass your shipper a two-digit country code for them to calculate your shipping, but some of your customers may not know the two digit code for their country.

Here is an example of how to create a country dropdown box with three values:

Country;United States:US;Canada:CA;Mexico:MX

This means:
OptionName;Display1:Value1;Display2:Value2;etc ...

*Click here for a pre-made list of state or country values you can paste into your cart.*
(21 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name: