FormField
|
+--PhoneNumberField
public class PhoneNumberField
extends FormField
Field Summary | |
---|---|
mixed | The maximum length of the phone extension. |
mixed | The sub field for the extension of the phone number. |
mixed | The sub field for the 1st part of the phone number. |
mixed | The sub field for the 2nd part of the phone number. |
mixed | The sub field for the 3rd part of the phone number. |
mixed | $subFieldDisplayValueSeparator The string used to separate the display value parts. |
mixed | The string used to separate the sub fields. |
mixed | True if an empty sub field constitutes an invalid value. |
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 | |
---|---|
PhoneNumberField(string name, string label, int required) Creates a new PhoneNumberField. |
|
__construct(string name, string label, int required) Creates a new PhoneNumberField. |
Method Summary | |
---|---|
string | Returns the display value of this field. |
string | 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. |
void | setValue(string value) Sets the value of this form field. |
public mixed $SIZE_PHONE_EXT = 5
The maximum length of the phone extension.
public mixed $ext = null
The sub field for the extension of the phone number.
public mixed $p1 = null
The sub field for the 1st part of the phone number.
public mixed $p2 = null
The sub field for the 2nd part of the phone number.
public mixed $p3 = null
The sub field for the 3rd part of the phone number.
public mixed $subFieldDisplayValueSeparator = "-"
The string used to separate the display value parts.
public mixed $subFieldSeparator = " - "
The string used to separate the sub fields.
public mixed $subFieldsCannotBeEmpty = false
True if an empty sub field constitutes an invalid value.
public PhoneNumberField(string name, string label, int required)
Creates a new PhoneNumberField.
public string getDisplayValue()
Returns the display value of this field. For example, the field may have a value of "2127348943" and its display value could be "212-734-8943".
public string getEditableFieldTag()
Returns the HTML used to display the input portion of this field.
public boolean isValid()
Checks for field errors detected by this field, including a check for blank. If an error is detected, the setError() method is called to set the appropriate error message.
public void setValue(string value)
Sets the value of this form field.
PhoneNumberField is a field for editing an American office phone number in the form, "AAA-BBB-CCCC xDDDDD". The extension is optional.