FORMfields


FORMfields.fields.CountryField

Class CountryField

FormField
|
+--DropDownField
|
+--CountryField

public class CountryField
extends DropDownField

CountryField is a drop down list of countries.

Since:
FORMfields v1.0

Field Summary
mixed

$COUNTRIES

An array of full country names.

mixed

$COUNTRY_ABBREVIATIONS

An array of abrreviated country names where the indicies correspond to those of COUNTRIES.

Fields inherited from FORMfields.fields.DropDownField
OR_STRING_MAX_SIZE, blankString, fieldEnabled, height, includeNewChoice, newChoice, options, subFieldsCannotBeEmpty, values
Fields inherited from FORMfields.fields.FormField
autoPropagate, data, disableEnterHandler, displayValuesOnNewLine, editable, enabled, endingString, enterTabHandler, enterTabs, error, extraHtml, fieldBelowLabel, formError, help, hidden, htmlify, id, isData, label, labelForId, multiValues, name, required, subFieldDisplayValueSeparator, subFieldSeparator, subFieldValueSeparator, subFields, subFieldsCannotBeEmpty, trimWhitespace, validators, value, valueIsHtml
Constructor Summary

CountryField(string name, string label, int required, string blankString)

Creates a new CountryField.

__construct(string name, string label, int required, string blankString)

Creates a new CountryField.

Methods inherited from FORMfields.fields.DropDownField
getEditableFieldTag, getParameter, setValue
Methods inherited from FORMfields.fields.FormField
addFieldValidator, addSubField, checkForBlank, clearValue, disable, formatRequestParameter, formatText, getButtonClicked, getData, getDbValue, getDisableFieldJs, getDisableJs, getDisableLabelJs, getDisplayFieldTag, getDisplayHtmlValue, getDisplayLabelTag, getDisplayValue, getEditable, getEditableFieldTag, getEditableLabelTag, getEnabled, getError, getExtraHtml, getFieldTag, getFormError, getHelp, getHelpTag, getHidden, getHiddenFieldTag, getId, getIsData, getIsHidden, getLabel, getLabelHtml, getLabelTag, getName, getOrNull, getParameter, getRawDbValue, getRequired, getValue, isBlank, isEmpty, isValid, setAutoPropagate, setData, setDbValue, setDisplayValuesOnNewLine, setEditable, setEnabled, setEndingString, setError, setExtraHtml, setFieldBelowLabel, setFormError, setHelp, setHidden, setHtmlify, setId, setIsData, setIsHidden, setLabel, setName, setRequired, setTrimWhitespace, setValue, setValueIsHtml, validate

Field Detail

COUNTRIES

public mixed $COUNTRIES = array("United States"

An array of full country names.

Since:
FORMfields v1.0

COUNTRY_ABBREVIATIONS

public mixed $COUNTRY_ABBREVIATIONS = array("US"

An array of abrreviated country names where the indicies correspond to those of COUNTRIES.

Since:
FORMfields v1.0

Constructor Detail

CountryField

public CountryField(string name, string label, int required, string blankString)

Creates a new CountryField.

Parameters:
name - the name of the form field. This value must not be a SQL reserved word and should follow all the standard variable naming conventions in PHP.
label - this form field's label. The label is the printable text that is typically displayed on the left side of the field.
required - Sets whether the field must be filled in and whether it looks like it must be filled in: FORM_FIELD_REQUIRED, FORM_FIELD_NOT_REQUIRED, FORM_FIELD_LOOKS_REQUIRED or FORM_FIELD_REQUIRED_NO_LOOK
blankString - the default display value of the drop down field. Defaulted to a blank string.
See Also:
FORM_FIELD_REQUIRED
FORM_FIELD_NOT_REQUIRED
FORM_FIELD_LOOKS_REQUIRED
FORM_FIELD_REQUIRED_NO_LOOK
Since:
FORMfields v1.0
Deprecated:
deprecated as this constructor syntax is not expected in PHP 5 - will be removed once PHP 5 becomes a minimum requirement for FORMfields

FORMfields