2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Hidden field.
|
2008-01-09 05:18:36 +01:00
|
|
|
* @package forms
|
|
|
|
* @subpackage fields-dataless
|
2007-07-19 12:40:28 +02:00
|
|
|
*/
|
|
|
|
class HiddenField extends FormField {
|
|
|
|
/**
|
|
|
|
* Returns an hidden input field, class="hidden" and type="hidden"
|
|
|
|
*/
|
|
|
|
function Field() {
|
2009-06-19 03:36:09 +02:00
|
|
|
$extraClass = $this->extraClass();
|
2007-07-19 12:40:28 +02:00
|
|
|
//if($this->name=="ShowChooseOwn")Debug::show($this->value);
|
2009-06-19 03:36:09 +02:00
|
|
|
return "<input class=\"hidden$extraClass\" type=\"hidden\" id=\"" . $this->id() . "\" name=\"{$this->name}\" value=\"" . $this->attrValue() . "\" />";
|
2007-07-19 12:40:28 +02:00
|
|
|
}
|
|
|
|
function FieldHolder() {
|
|
|
|
return $this->Field();
|
|
|
|
}
|
|
|
|
function performReadonlyTransformation() {
|
2008-12-04 23:38:32 +01:00
|
|
|
$clone = clone $this;
|
|
|
|
$clone->setReadonly(true);
|
|
|
|
return $clone;
|
2007-07-19 12:40:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function IsHidden() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static function create($name) { return new HiddenField($name); }
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|