Source for file textarea.php
Documentation is available at textarea.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Adam Daniel <adaniel1@eesus.jnj.com> |
// | Bertrand Mansion <bmansion@mamasam.com> |
// +----------------------------------------------------------------------+
// $Id: textarea.php,v 1.11 2004/02/28 22:10:16 avb Exp $
require_once("HTML/QuickForm/element.php");
* HTML class for a textarea type field
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @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 Mon, 11 Mar 2019 14:16:37 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|