FORMfields


FORMfields.fields.PickPasswordField

Class PickPasswordField

FormField
|
+--TextField
|
+--PickPasswordField

public class PickPasswordField
extends TextField

PickPasswordField is a password field. Note: this field doesn't trim the whitespace at the front or back of the entered password. Valid passwords are comprised of only letters, digits, '_' and '@'.

Since:
FORMfields v1.0

Field Summary
mixed

$MAX_SIZE

The maximum length of the password permitted.

mixed

$MIN_SIZE

The minimum length of the password permitted.

mixed

$REGEX_PASSWORD

mixed

$trimWhitespace

Don't trim whitespace at the front or back of the entered password.

Fields inherited from FORMfields.fields.TextField
maxLength, minLength, size
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

PickPasswordField(string name, string label, int required)

Creates a new PickPasswordField.

__construct(string name, string label, int required)

Creates a new PickPasswordField.

Method Summary
string

getEditableFieldTag()

Returns the HTML used to display the input portion of this field.

boolean

isValid()

Checks for field errors detected by this field, including a check for blank.

Methods inherited from FORMfields.fields.TextField
getEditableFieldTag, isValid
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

MAX_SIZE

public mixed $MAX_SIZE = 20

The maximum length of the password permitted.

Since:
FORMfields v1.0

MIN_SIZE

public mixed $MIN_SIZE = 5

The minimum length of the password permitted.

Since:
FORMfields v1.0

REGEX_PASSWORD

public mixed $REGEX_PASSWORD = "/^[^ ]+\$/i"

trimWhitespace

public mixed $trimWhitespace = false

Don't trim whitespace at the front or back of the entered password.

Since:
FORMfields v3.0

Constructor Detail

PickPasswordField

public PickPasswordField(string name, string label, int required)

Creates a new PickPasswordField.

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
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

Method Detail

getEditableFieldTag

public string getEditableFieldTag()

Returns the HTML used to display the input portion of this field.

Returns:
the HTML used to display the input portion of this field
Since:
FORMfields v1.0

isValid

public boolean isValid()

Checks for field errors detected by this field, including a check for blank. Ensures that the value is comprised of letters, digits, underscores and at signs. If an error is detected, the setError() method is called to set the appropriate error message.

Returns:
true if there is an error or false otherwise
Since:
FORMfields v1.0

FORMfields