Class TFormSelect

Description

Basic Select Field

  • version: 03-08-2002 12:00
  • author: Greg MacLellan

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

TFormElement
   |
   --TFormSelect
Direct descendents
Class Description
TFormLookup Select Field, values taken from database table
TFormSelectSubmit Select Field, with auto-submit
Variable Summary
mixed $elements
mixed $htmltype
mixed $required
mixed $type
Method Summary
TFormSelect TFormSelect (string $name, string $displayname, string $class, bool $required, array $elements, [string $value = ""], [bool $store = true])
A getValue ([$display $display = false])
void output ()
void validate ()
Variables
mixed $elements (line 13)

Redefined in descendants as:
mixed $htmltype = "select" (line 18)

The HTML element type


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

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

Redefined in descendants as:
mixed $type = "select" (line 16)

The type of element


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

Redefined in descendants as:

Inherited Variables

Inherited from TFormElement

TFormElement::$alwaysSet
TFormElement::$class
TFormElement::$displayname
TFormElement::$name
TFormElement::$parent
TFormElement::$store
TFormElement::$value
Methods
Constructor TFormSelect (line 38)

Creates a new TFormSelect element (basic select field).

TFormSelect TFormSelect (string $name, string $displayname, string $class, bool $required, array $elements, [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 first element can't be selected
  • array $elements: The elements to go in the box. Key field is value, value is the displayed value.
  • 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.
getValue (line 75)

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

Redefinition of:
TFormElement::getValue()
Returns a textual description of the current value
output (line 55)
void output ()

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

Redefined in descendants as:
validate (line 44)
void validate ()

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

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:57 -0500 by phpDocumentor 1.2.3