Country Select

Outputs a select dropdown of countries.

To edit the list of countries that are used, see Locales Config.

Table of Contents

Parameters

name

The name of the select field (not a country name).

name="my_select_name"
selected

Currently selected country.

selected="USA"
id

CSS id of your form. This is an arbitrary value.

id="my_id"
class

CSS class of your form. This is an arbitrary value.

class=""
extra

Any extra tag data you’d like to add.

extra='rel="my_attr" title="my title"'
add_blank

Adds a blank “–” value to the dropdown.

add_blank="yes"

Examples

{exp:cartthrob:save_customer_info_form return="cart/view_cart"}
    {exp:cartthrob:country_select name="country_code" selected="{customer_country_code}"}
    <input type="submit" value="Update Your Country" />
{/exp:cartthrob:save_customer_info_form}