Source for file textarea.php
Documentation is available at textarea.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
* HTML class for a textarea type field
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
* @package HTML_QuickForm
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @copyright 2001-2007 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version CVS: $Id: textarea.php,v 1.12 2007/05/29 18:34:36 avb Exp $
* @link http://pear.php.net/package/HTML_QuickForm
* Base class for form elements
require_once 'HTML/QuickForm/element.php';
* HTML class for a textarea type field
* @package HTML_QuickForm
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @version Release: 3.2.10
* @param string Input field name attribute
* @param mixed Label(s) for a field
* @param mixed Either a typical HTML attribute string or an associative array
$this->_persistantFreeze = true;
$this->_type = 'textarea';
* Sets the input field name
* @param string $name Input field name attribute
$this->updateAttributes (array ('name'=> $name));
* Returns the element name
return $this->getAttribute ('name');
* Sets value for textarea element
* @param string $value Value for textarea element
* Returns the value of the form element
* Sets wrap type for textarea element
* @param string $wrap Wrap type
$this->updateAttributes (array ('wrap' => $wrap));
* Sets height in rows for textarea element
* @param string $rows Height expressed in rows
$this->updateAttributes (array ('rows' => $rows));
* Sets width in cols for textarea element
* @param string $cols Width expressed in cols
$this->updateAttributes (array ('cols' => $cols));
* Returns the textarea element in HTML
if ($this->_flagFrozen) {
return $this->_getTabs () .
'<textarea' . $this->_getAttrString ($this->_attributes) . '>' .
// because we wrap the form later we don't want the text indented
* Returns the value of field without HTML tags (in this case, value is changed to a mask)
if ($this->getAttribute ('wrap') == 'off') {
$html = $this->_getTabs () . '<pre>' . $value. "</pre>\n";
$html = nl2br($value). "\n";
return $html . $this->_getPersistantData ();
} //end func getFrozenHtml
} //end class HTML_QuickForm_textarea
Documentation generated on Fri, 05 Oct 2007 16:30:46 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.
|