00001 <?php 00008 class TextareaField extends AbstractField 00009 { 00010 public $width = ''; 00011 public $height = ''; 00012 00016 function drawInput() 00017 { 00018 $attr = $this->extrasAsAttributes(); 00019 00020 if($this->hasError) 00021 $css = ' class="errorinput" '; 00022 00023 if ($this->width || $this->height) 00024 { 00025 $style = 'style="'; 00026 00027 if ($this->width) 00028 $style .= " width: $this->width;"; 00029 if ($this->height) 00030 $style .= " height: $this->height;"; 00031 00032 $style .= ' "'; 00033 } 00034 00035 echo "<textarea name=\"$this->name\" $css $style $attr>$this->value</textarea>"; 00036 } 00037 } 00038 ?>