FormLib
[ class tree: FormLib ] [ index: FormLib ] [ all elements ]

Class: TextField

Source Location: /FormLib/TextField.php

Class Overview

Field
   |
   --TextField

Object oriented wrapper around an HTML text input field.


Author(s):

  • Randy L. Pearson

Version:

  • 0.2

Methods


Child classes:

PasswordField
Object oriented wrapper around an HTML text password field.

Inherited Variables

Inherited Methods

Class: Field

Field::__construct()
Constructor
Field::display()
Function to render the field as HTML.
Field::displayField()
Renders the field as HTML. Must be overridden in child classes.
Field::isValid()
Checks to see if the data entered into a field is valid.
Field::__get()
Property accessor.
Field::__set()
Property mutator.

Class Details

[line 16]
Object oriented wrapper around an HTML text input field.



Tags:

author:  Randy L. Pearson
version:  0.2


[ Top ]


Class Methods


constructor __construct [line 29]

TextField __construct( string $name, string $label, [string $value = ""], [ $type = "text"], [integer $maxLength = 255], [integer $size = 40])

Constructor

Initializes a TextField object.




Tags:

access:  public


Overridden in child classes as:

PasswordField::__construct()
Constructor Initializes a PasswordField object.

Overrides Field::__construct() (Constructor)

Parameters:

string   $name   Name assigned to the field.
string   $label   Text assigned to the field.
string   $value   Value assigned to the field.
integer   $maxLength   Maximum number of characters the field will accept. (Default: 255)
integer   $size   Width of the field on the HTML page. (Default: 40)
   $type  

[ Top ]

method displayField [line 40]

void displayField( $formStyle)

Renders the label and text field assuming a 2 column table.



Tags:

access:  protected


Overrides Field::displayField() (Renders the field as HTML. Must be overridden in child classes.)

Parameters:

   $formStyle  

[ Top ]


Documentation generated on Wed, 15 Nov 2006 08:48:09 -0600 by phpDocumentor 1.3.1