Class TFormTextNumber

Description

Text Field, only accepts numbers

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

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

TFormElement
   |
   --TFormText
      |
      --TFormTextNumber
Direct descendents
Class Description
TFormTextCurrency Text Field, only accepts dollar values
Variable Summary
mixed $format
mixed $maxdec
mixed $maxval
mixed $minval
Method Summary
TFormTextNumber TFormTextNumber (string $name, string $displayname, string $class, bool $required, int $size, bool $format, [int $min = null], [int $max = null], [int $maxdec = null], [string $value = ""], [bool $store = true])
void output ()
true setValue (mixed $value, bool $user)
void validate ()
Variables
Methods
Constructor TFormTextNumber (line 39)

Creates a new TFormTextInt element (integer input field).

TFormTextNumber TFormTextNumber (string $name, string $displayname, string $class, bool $required, int $size, bool $format, [int $min = null], [int $max = null], [int $maxdec = null], [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
  • bool $format: True to format the value using comma seperators
  • int $min: The minimum value, or null if no minimum
  • int $max: The maximum value, or null if no maximum
  • int $maxdec: Maximum number of decimal places, null if no maximum
  • 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 114)
void output ()

Redefinition of:
TFormText::output()

Redefined in descendants as:
setValue (line 108)

Sets the value of the field

  • return: if the value was set
true setValue (mixed $value, bool $user)
  • mixed $value: The value to set
  • bool $user: True if the value is from user input

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

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

Redefinition of:
TFormText::validate()

Inherited Methods

Inherited From TFormText

TFormText::TFormText()
TFormText::output()
TFormText::setRegex()
TFormText::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:58 -0500 by phpDocumentor 1.2.3