Company | Newzulu Platform | Developer

Developer Template Documentation v4.12.2.47

fm:Form_State


This component allows you to generate a selectbox, with a list of states or provinces. You can specify a country-code (or multiple) to only show them for specific countries. Currently only provinces for the US and Canada are supported.

Example

<fm:Form_State countries="CA,US" name="state" />

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
countriesOptionalCASpecify the countrycodes for the states/provinces you'd like to see. Currently only CA and US are supported, you can specify multiple countries with commas.
defaultLabelOptional- please select -The top value in the list.
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
notapplicableOptional0If this is set to '1', we will show a 'Not Applicable' option in the bottom of the list. The state-value for this will be 'XX'
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

See also

More examples

<fm:Form_State countries="US" name="state" notapplicable="1" label="State (US-only)" defaultLabel="None selected" />
<< 3.3.20 fm:Form_Select 3.3.22 fm:Form_TextArea >>