Class TFormMultiCheck

Description

Multiple-item check boxes

Allows a user to select multiple items that will go into one field

  • version: 07-24-2003 12:00
  • author: Greg MacLellan

Located in /form-multicheck.inc.php (line 14)

TFormElement
   |
   --TFormMultiCheck
Variable Summary
mixed $callback
mixed $elements
mixed $htmltype
mixed $seperator
mixed $type
Method Summary
TFormMultiCheck TFormMultiCheck (string $name, string $displayname, string $class, array $elements, [string $seperator = ";"], [func $callback = null], [array $value = ""], [bool $store = true])
A getValue ([$display $display = false])
void output ()
true setValue (mixed $value)
void validate ()
Variables
mixed $callback (line 17)
mixed $elements (line 15)
mixed $htmltype = "checkbox" (line 21)

The HTML element type


Redefinition of:
TFormElement::$htmltype
The HTML element type
mixed $seperator (line 16)
mixed $type = "multicheck" (line 19)

The type of element


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

Inherited Variables

Inherited from TFormElement

TFormElement::$alwaysSet
TFormElement::$class
TFormElement::$displayname
TFormElement::$name
TFormElement::$parent
TFormElement::$store
TFormElement::$value
Methods
Constructor TFormMultiCheck (line 49)

Creates a new TFormMultiCheck element (multiple checkboxes).

TFormMultiCheck TFormMultiCheck (string $name, string $displayname, string $class, array $elements, [string $seperator = ";"], [func $callback = null], [array $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
  • array $elements: The elements to go in the box. Key field is value, value is the displayed value.
  • string $seperator: The value used to seperate the values in the returned string (by default a semi-colon)
  • func $callback: A callback function used to generate the code for individual items. It will get an array containing: [html] - the html for the checkbox, [name] - the display name, [num] - the item number, [total] - the total number of items that will be passed. It should return the exact value to display. By default, if this field is null, it will display the Checkbox, followed by the display name, followed by a
    tag.
  • array $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 108)

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 60)
void output ()

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

Sets the value of the field

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

Redefinition of:
TFormElement::setValue()
Sets the value of the field
validate (line 56)
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:56 -0500 by phpDocumentor 1.2.3