Class TFormElement

Description

Base class for all Form elements. This does nothing on its own.

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

Located in /form-element.inc.php (line 11)


	
			
Direct descendents
Class Description
TFormCheckbox Basic Text Field
TFormDateTime Date and Time Field
TFormDayMatrix Picks day of week
TFormDayPicker Picks day of week
TFormDisplay Displays the value of a field. Only for display purposes, not used in queries.
TFormDivision Division in edit form. Only for display purposes, not stored anywhere.
TFormFileDisk Basic File Upload Handler
TFormFile Basic File Upload Handler
TFormHidden Basic Hidden Field
TFormMultiCheck Multiple-item check boxes
TFormRadio Basic Radio Button Set
TFormSelect Basic Select Field
TFormStatic Displays a static text value (not stored)
TFormSubmit Basic Submit button
TFormTextarea Text Area
TFormText Basic Text Field
Variable Summary
mixed $alwaysSet
mixed $class
mixed $displayname
mixed $htmltype
mixed $name
mixed $parent
mixed $store
mixed $type
mixed $value
Method Summary
TFormElement TFormElement (string $name, string $displayname, string $class, [string $value = ""], [bool $store = true])
A getValue ([$display $display = false])
void output ()
void setParent (mixed &$parent)
true setValue (mixed $value)
Boolean validate ()
Variables
mixed $alwaysSet = false (line 18)

If the value should always be set, even if null

mixed $class (line 16)
mixed $displayname (line 13)
mixed $htmltype = "" (line 22)

The HTML element type


Redefined in descendants as:
mixed $name (line 12)
mixed $parent = null (line 24)

Parent form

mixed $store (line 15)
mixed $type = "element" (line 20)

The type of element


Redefined in descendants as:
mixed $value (line 14)

Redefined in descendants as:
Methods
Constructor TFormElement (line 41)

Basic constructor for form elements.

TFormElement TFormElement (string $name, string $displayname, string $class, [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
  • 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: Weather this value is persistent. Used by TDBForm to decide to save/load this value from database.
getValue (line 81)

Returns a textual description of the current value

  • return: string containing the value of the element
A getValue ([$display $display = false])
  • $display $display: True if the value is going to be used for display

Redefined in descendants as:
setParent (line 85)
void setParent (mixed &$parent)
setValue (line 71)

Sets the value of the field

  • return: if the value was set
true setValue (mixed $value)
  • mixed $value: The value to set

Redefined in descendants as:

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