00001 <?php 00008 class TextField extends AbstractField 00009 { 00010 public $width = ''; 00011 00015 public function drawInput() 00016 { 00017 $attr = $this->extrasAsAttributes(); 00018 00019 if($this->hasError) 00020 $css = 'class="errorinput"'; 00021 00022 if ($this->width) 00023 $style = "style=\"width: $this->width;\""; 00024 00025 echo "<input type=\"text\" name=\"$this->name\" value=\"$this->value\" $css $attr $style/>"; 00026 } 00027 } 00028 ?>