HTMLForm_Controls
[ class tree: HTMLForm_Controls ] [ index: HTMLForm_Controls ] [ all elements ]

Class: HTMLForm_textarea

Source Location: /includes/class.htmlform_textarea.php

Class Overview

xss_clean
   |
   --HTMLForm_control
      |
      --HTMLForm_textarea

Class for textarea controls


Author(s):

Copyright:

  • (c) 2006 - 2008 Stefan Gabos

Methods


Inherited Variables

Inherited Methods

Class: HTMLForm_control

HTMLForm_control::disable_xss_filters()
Disables XSS filtering for the value of the control
HTMLForm_control::getAttributes()
Returns the values of requested HTML attributes of the control
HTMLForm_control::setAttributes()
Sets one or more HTML attributes of the control
HTMLForm_control::setRule()
Sets validation rules for the control

Class Details

[line 10]
Class for textarea controls



Tags:

copyright:  (c) 2006 - 2008 Stefan Gabos
author:  Stefan Gabos <ix@nivelzero.ro>


[ Top ]


Class Methods


constructor HTMLForm_textarea [line 56]

void HTMLForm_textarea( string $controlID, [string $defaultValue = ''], [array $attributes = ''])

Inserts an HTML <textarea> control in the form

Do not instantiate this class directly!

Use HTMLForm::add() method instead!

  1.   /*
  2.   notice the use of the "&" symbol -> it's the way we can have a reference to the object in PHP4
  3.   */
  4.  
  5.   $obj $form->add('textarea''control_id''Default text');




Parameters:

string   $controlID  

Unique name to identify the control in form

Note that control's ID attribute will be, by default, the same as the name attribute! This means that this will be the name you will be using to refer to the control in the POST/GET superglobals, after the form has been submitted


string   $defaultValue   (Optional) Default text

array   $attributes  

(Optional) an array of user specified HTML attributes valid for a textarea control

Must be specified as an associative array of type attributeName => attributeValue

See HTMLForm_control::setAttributes() method to see how to set HTML attributes, other than through the class' constructor

Note that the following properties are automatically set and should not be altered manually:

id, name, class, onfocus, onblur

If you don't use templates for the form's output but rather let the script automatically generate it for you, you may use a special attribute called "nobr" (used like "nobr" => true) which will instruct the script to not start a new line after the control having this attribute set, but place the next control on the same line



[ Top ]


Documentation generated on Mon, 22 Sep 2008 11:03:18 +0300 by phpDocumentor 1.3.0RC6