Class TFormDate

Description

Date Field

  • version: 05-07-2002 11:50
  • author: Greg MacLellan

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

TFormElement
   |
   --TFormDateTime
      |
      --TFormDate
Variable Summary
mixed $htmltype
mixed $type
Method Summary
TFormDate TFormDate (string $name, string $displayname, string $class, bool $required, [array $yearrange = array(100,0)], [int $monthnames = null], [int $value = ""], [bool $store = true])
void output ()
true setValue (mixed $value)
Variables
mixed $htmltype = "select" (line 16)

The HTML element type


Redefinition of:
TFormDateTime::$htmltype
The HTML element type
mixed $type = "datetime" (line 14)

The type of element


Redefinition of:
TFormDateTime::$type
The type of element

Inherited Variables

Inherited from TFormDateTime

TFormDateTime::$minuteIncrement
TFormDateTime::$months
TFormDateTime::$required

Inherited from TFormElement

TFormElement::$alwaysSet
TFormElement::$class
TFormElement::$displayname
TFormElement::$name
TFormElement::$parent
TFormElement::$store
TFormElement::$value
Methods
Constructor TFormDate (line 43)

Creates a new TFormDate element (multi-combobox based date field).

TFormDate TFormDate (string $name, string $displayname, string $class, bool $required, [array $yearrange = array(100,0)], [int $monthnames = null], [int $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
  • array $yearrange: The range of years to display. This can be used two different ways: array(subtract,add), ie: array(100,0) specifies to show 100 years before the current year, up to the current year. The second way is to specify array("min"=>min,"max"=>max), ie: array("min"=>2000,"max"=>2010) will show from 2000 to 2010, regardless of the current year.
  • int $monthnames: An array of all the names to use for the months, indexed starting at 1. If null, a default of the full English month name is used (ie "January", "September", etc)
  • int $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 71)
void output ()

Redefinition of:
TFormDateTime::output()
setValue (line 54)

Sets the value of the field

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

Redefinition of:
TFormDateTime::setValue()
Sets the value of the field

Inherited Methods

Inherited From TFormDateTime

TFormDateTime::TFormDateTime()
TFormDateTime::getValue()
TFormDateTime::output()
TFormDateTime::setValue()
TFormDateTime::validate()

Inherited From TFormElement

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

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