[memb_country_dropdown]

Version Added 2.40

Summary

This shortcode provides a way to make your country dropdown fields auto-select the contact’s current country value. It will generate the appropriate <option> HTML shortcodes and marks the currently matching value as selected.

Currently this shortcode doesn’t support referencing a different contact.

Shortcode Examples

Basic Example:

<select name="Contact0_Country" id="Contact0_Country">
[memb_country_dropdown field="country"]
</select>

Example setting Canada as the default choice:

<select name="Contact0_Country" id="Contact0_Country">
[memb_country_dropdown field=country default=Canada]
</select>

Example using only a limited list of countries (Five Eyes):

<select name="Contact0_Country" id="Contact0_Country">
[memb_country_dropdown field=country only='Australia,Canada,New Zealand,United Kingdom,United States']
</select>

Example excluding a limited list of countries:

<select name="Contact0_Country" id="Contact0_Country">
[memb_country_dropdown field=country except='Syria,North Korea']
</select>

Shortcode Parameters

default:  The default country value to use if the current user has no country field set.

field: The field you want to use to match the country field.  This can be any field, but Country, Country2, and Country3, or a custom field would be the most commonly used fields.

only:  Used to filter the list of countries in the dropdown by including only the countries listed.  Takes a comma separated list of countries to include.  If the users current country is not in the only list, then it will be added to maintain integrity of the data.  New in 2.45.13

except: Used to filter the list of countries in the dropdown to exclude the countries listed.  Takes a comma separated list of countries to exclude.  If the users current country is in the exclusion list, then it will be added to maintain integrity of the data. New in 2.45.13

 

Shortcode Attributes

Conditional: No (?)
Nestable: No (?)
Accepts formatting: No (?)
Capturable: No (?)