diff --git a/include/lib/html_input.class.php b/include/lib/html_input.class.php
index 7fa10b0bb..9e82f2fb9 100755
--- a/include/lib/html_input.class.php
+++ b/include/lib/html_input.class.php
@@ -68,7 +68,7 @@ class HtmlInput
var $javascript; /*!< $javascript is the javascript to add to the widget */
var $ctrl; /*!<$ctrl is the control to update (see js_search_card_control) */
var $tabindex;
-
+ var $require;
function __construct($p_name="", $p_value="", $p_id="")
{
$this->name=$p_name;
@@ -85,6 +85,7 @@ class HtmlInput
$this->extra2="all";
$this->attribute=array();
$this->id=$p_id;
+ $this->require=false;
}
function setReadOnly($p_read)
@@ -187,13 +188,14 @@ class HtmlInput
//#####################################################################
/* Debug
*/
- function debug()
+ function __toString()
{
- echo "Type ".$this->type."
";
- echo "name ".$this->name."
";
- echo "value".$this->value."
";
- $readonly=($this->readonly==false)?"false":"true";
- echo "read only".$readonly."
";
+ $r= "Type ".$this->type."
";
+ $r.= "name ".$this->name."
";
+ $r.= "value".$this->value."
";
+ $readonly=(isset($this->readOnly) && $this->readOnly==false)?"false":"true";
+ $r.= "read only".$readonly."
";
+ return $r;
}
static function submit($p_name, $p_value, $p_javascript="",