fm:Form_Country


Component to display the countries dropdown menu

Example 1

This will create a country dropdown form field, with English being a default language:

<fm:Form_Country name="country">

Example 2

This will create a country dropdown form field, displayed in Spanish:

<fm:Form_Country name="country" language="es">

Supported attributes

NameRequiredDefaultDescription
classOptionalThe css classname that will be assigned to the actual html form field. Note that a few default classes might be added
disabledOptionalN/AThis will set the html disabled attribute
idOptionalrandomizedThe id of the form element. Note that this id will also be used for the 'for' attribute in the <label> component
labelOptionalN/AThis attribute will be used to generate labels for this component, if it's used within an fm:Form component
languageOptionalN/AThis specifies which language to use for the display of the form_country dropdown. Choices are:
  • en - English
  • es - Spanish
  • fr - French
  • nl - Dutch
multipleOptionalN/ASetting multiple will allow the user to select multiple items in this dropdown.
nameRequiredN/AThe name of the form field. This is how the value will be submitted back to the server
readonlyOptionalN/AThis sets the html readonly attribute and controls if the user can change the value
requiredOptional0Set required to '1' if you'd like the form validator to check if this form element has a value before submitting
sizeOptionalN/AThe size attribute will be directly passed through to this component and dictates how much items are showing by default.
styleOptionalThe style attribute for the actual form component
titleOptionalN/ASets the title attribute on the select element.
valueOptionalThe current value of the form element

Template variables

This component defines no template variables.

See also

Example 3

This will create a country dropdown form field for Canada (showing Canadian provinces only), and make this a `required` field:

<fm:Form_Country name="country" value="CA" required />