FORMfields


FORMfields.fields.TextField

Class TextField

FormField
|
+--TextField

public class TextField
extends FormField

TextField is a field that allows for the editing of a single line of text.

Since:
FORMfields v1.0

Field Summary
mixed

$maxLength

The maximum permitted length of the text.

mixed

$minLength

The minimum permitted length of the text.

mixed

$size

The display length of the text.

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

TextField(string name, string label, int required, int maxLength, int minLength, int size)

Constructs a new TextField.

__construct(string name, string label, int required, int maxLength, int minLength, int size)

Constructs a new TextField.

Method Summary
string

getEditableFieldTag()

Returns the HTML of this editable text field.

boolean

isValid()

Returns true if the contents of this field are valid and the length of the text is within minLength and maxLength.

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

maxLength

public mixed $maxLength = null

The maximum permitted length of the text.

Since:
FORMfields v1.0

minLength

public mixed $minLength = null

The minimum permitted length of the text.

Since:
FORMfields v1.0

size

public mixed $size = null

The display length of the text.

Since:
FORMfields v1.0

Constructor Detail

TextField

public TextField(string name, string label, int required, int maxLength, int minLength, int size)

Constructs a new TextField.

See Also:
FORMfields.fields.FormField#required
FORM_FIELD_REQUIRED
FORM_FIELD_NOT_REQUIRED
FORM_FIELD_LOOKS_REQUIRED
FORM_FIELD_REQUIRED_NO_LOOK
Parameters:
name - the name of the field
label - the field label
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
maxLength - the maximum permitted length of the text
minLength - the minimum permitted length of the text
size - the display length of the text or null
Since:
FORMfields v1.0
Deprecated:
deprecated as 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 of this editable text field.

Returns:
the HTML of this editable text field
Since:
FORMfields v1.0

isValid

public boolean isValid()

Returns true if the contents of this field are valid and the length of the text is within minLength and maxLength.

Returns:
true if the contents of this field are valid and the length of the text is within minLength and maxLength
Since:
FORMfields v1.0

FORMfields