Class input_textarea

Description

Input textarea class.

  • version: $Revision: 1.3 $

Located in /input.textarea.php (line 34)

input_base
   |
   --input_form_element
      |
      --input_textarea
Variable Summary
Method Summary
 input_textarea input_textarea (string $name, object &$form, [string $regex = NULL], [string $value = NULL], [string $caption = NULL], [mixed $maxlength = FALSE])
 void display ([string $class = NULL], [int $width = NULL], [int $height = NULL], [string $javascript = NULL])
 bool set (string $value)
Variables
int $maxlength (line 51)

The maximum number of characters allowed in the textarea.

This is not part of the HTML 4.0.1 spec, and is not directly supported or displayed as part of the textarea. If a maximum is specified, it is used as a hint to the template (in case it wants to provide javascript hints or other information to the user), and it can be used to calculate the width and height of the area at display time if the values are not otherwise provided by the caller.

If maxlength is unspecified, it's value is FALSE.

Inherited Variables

Inherited from input_form_element

input_form_element::$caption
input_form_element::$form

Inherited from input_base

input_base::$default
input_base::$name
input_base::$regex
input_base::$required
input_base::$value
input_base::$wasSet
input_base::$wasValid
Methods
Constructor input_textarea (line 62)

Constructs a new textarea object.

input_textarea input_textarea (string $name, object &$form, [string $regex = NULL], [string $value = NULL], [string $caption = NULL], [mixed $maxlength = FALSE])
  • string $name: The name of the textarea.
  • object $form: Reference to associated form.
  • string $regex: The validation regular expression.
  • string $value: The initial contents value.
  • string $caption: The caption to display by the textarea.
display (line 109)

Display the textarea. Called by templates to render text area form elements.

If the textarea value was not valid, 'error' is added to the CSS class, e.g. class="otherclass error".

void display ([string $class = NULL], [int $width = NULL], [int $height = NULL], [string $javascript = NULL])
  • string $class: CSS class assigned to text area
  • int $width: Number of columns for text area; a default width is only set if a CSS class
  • int $height: Number of rows for text area
  • string $javascript: Specification of javascript: onClick, etc.
set (line 77)

Sets the value of the textarea.

If a maxlength was specified, ensures that the textarea contents do not exceed that length.

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

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:58 -0800 by phpDocumentor 1.2.3