Class TFormText

Description

Basic Text Field

  • version: 09-02-2003 12:22
  • author: Greg MacLellan

Located in /form-text.inc.php (line 12)

TFormElement
   |
   --TFormText
Direct descendents
Class Description
TFormPassword Basic Password Field
TFormTextEmail Text Field, only accepts email addresses
TFormTextIntDouble Two text fields that only accept numbers.
TFormTextNumber Text Field, only accepts numbers
TFormTextPhone Text Field, formats as a phone number (north america)
TFormTextUrl Text Field, only accepts url's
Variable Summary
mixed $htmltype
mixed $maxsize
mixed $regex
mixed $required
mixed $size
mixed $type
Method Summary
TFormText TFormText (string $name, string $displayname, string $class, bool $required, int $size, int $maxsize, [string $value = ""], [bool $store = true])
void output ()
void setRegex (string $expr)
void validate ()
Variables
mixed $htmltype = "text" (line 19)

The HTML element type


Redefinition of:
TFormElement::$htmltype
The HTML element type

Redefined in descendants as:
mixed $maxsize (line 15)
mixed $regex (line 20)
mixed $required (line 13)
mixed $size (line 14)
mixed $type = "text" (line 17)

The type of element


Redefinition of:
TFormElement::$type
The type of element

Inherited Variables

Inherited from TFormElement

TFormElement::$alwaysSet
TFormElement::$class
TFormElement::$displayname
TFormElement::$name
TFormElement::$parent
TFormElement::$store
TFormElement::$value
Methods
Constructor TFormText (line 41)

Creates a new TFormText element (basic text field).

TFormText TFormText (string $name, string $displayname, string $class, bool $required, int $size, int $maxsize, [string $value = ""], [bool $store = true])
  • string $name: The name of the element. This should correspond to the field names if using with TDBForm, and should not include any spaces or special characters.
  • string $displayname: The name that should show up to the user for this field.
  • string $class: The HTML Class to use for the element
  • bool $required: True if the field has to be filled in
  • int $size: The displayed size of the text box
  • int $maxsize: The maximum number of characters allowed
  • string $value: The initial value for the field. Note if using a TDBForm this value will be overridden by loadValues so it is effectively only the default for new entries.
  • bool $store: Whether this value is persistent. Used by TDBForm to decide to save/load this value from database.
output (line 69)
void output ()

Redefinition of:
TFormElement::output()
Outputs the HTML for this tag

Redefined in descendants as:
setRegex (line 53)

Forces the string to be matched to a preg expression

void setRegex (string $expr)
  • string $expr: Perl-compatible regular expression to match
validate (line 57)
void validate ()

Redefinition of:
TFormElement::validate()
Validates the data in this field.

Redefined in descendants as:

Inherited Methods

Inherited From TFormElement

TFormElement::TFormElement()
TFormElement::getValue()
TFormElement::output()
TFormElement::setParent()
TFormElement::setValue()
TFormElement::validate()

Documentation generated on Thu, 27 Nov 2003 14:58:59 -0500 by phpDocumentor 1.2.3