// +----------------------------------------------------------------------+
import('form.FormElement');
-
+
class Hidden extends FormElement {
- var $mValue;
- var $cClassName = "Hidden";
- function Hidden($name,$value="")
- {
- $this->mName = $name;
- $this->mValue = $value;
- }
+ function __construct($name) {
+ $this->class = 'Hidden';
+ $this->name = $name;
+ }
+
+ function getHtml() {
+ if ($this->id == '') $this->id = $this->name;
- function toStringControl() {
-
- if ($this->mId=="") $this->mId = $this->mName;
-
- $html = "\n\t<input";
- $html .= " type=\"hidden\" name=\"$this->mName\" id=\"$this->mId\"";
-
- $html .= " value=\"".$this->getValue()."\"";
- $html .= ">";
-
- return $html;
- }
+ $html = "\n\t<input type=\"hidden\" id=\"$this->id\" name=\"$this->name\"";
+ $html.= ' value="'.$this->getValue().'">';
+ return $html;
+ }
}