Ejemplo n.º 1
0
 /**
  * FormHandler::textArea()
  *
  * Create a textarea on the form
  *
  * @param string $title: The title of the field
  * @param string $name: The name of the field
  * @param string $validator: The validator which should be used to validate the value of the field
  * @param int $cols: How many cols (the width of the field)
  * @param int $rows: How many rows (the height of the field)
  * @param string $extra: CSS, Javascript or other which are inserted into the HTML tag
  * @return void
  * @access public
  * @author Teye Heimans
  */
 function textArea($title, $name, $validator = null, $cols = null, $rows = null, $extra = null)
 {
     require_once FH_INCLUDE_DIR . 'fields/class.TextArea.php';
     // create new textarea
     $fld = new TextArea($this, $name);
     if (!empty($validator)) {
         $fld->setValidator($validator);
     }
     if (!empty($cols)) {
         $fld->setCols($cols);
     }
     if (!empty($rows)) {
         $fld->setRows($rows);
     }
     if (!empty($extra)) {
         $fld->setExtra($extra);
     }
     // register the field
     $this->_registerField($name, $fld, $title);
 }