Class input_checkbox

Description

Input checkbox class.

  • version: $Revision: 1.3 $

Located in /input.checkbox.php (line 25)

input_base
   |
   --input_form_element
      |
      --input_checkbox
Variable Summary
 bool $checked
Method Summary
 input_checkbox input_checkbox (string $name, object &$form, [bool $checked = FALSE], [string $caption = NULL])
 void display ([string $class = NULL], [string $javascript = NULL])
 void reset ()
 bool set (bool $value)
Variables
Methods
Constructor input_checkbox (line 41)

Constructs a new checkbox object.

input_checkbox input_checkbox (string $name, object &$form, [bool $checked = FALSE], [string $caption = NULL])
  • string $name: The name of the checkbox.
  • object $form: Reference to associated form.
  • bool $checked: The initial checkbox state.
  • string $caption: The caption to display by the checkbox.
display (line 109)

Display the checkbox.

If the value was not valid, the CSS class is set/changed to 'error'.

void display ([string $class = NULL], [string $javascript = NULL])
  • string $class: CSS class assigned to the checkbox
  • string $javascript: Specification of javascript: onClick, etc.
reset (line 67)

Reset checkbox value to default

void reset ()

Redefinition of:
input_base::reset()
Reset to value specified as default.
set (line 80)

Sets the value of the checkbox.

  • return: TRUE on success.
bool set (bool $value)
  • bool $value: The value to set the checkbox to.

Redefinition of:
input_base::set()
Sets the value of the object to the specified value if that value is valid according to regex given to constructor.

Inherited Methods

Inherited From input_form_element

 input_form_element::input_form_element()
 input_form_element::_get_error_css()

Inherited From input_base

 input_base::input_base()
 input_base::reset()
 input_base::set()

Documentation generated on Fri, 28 Jan 2005 10:00:55 -0800 by phpDocumentor 1.2.3