diff --git a/form.php b/form.php
index 52d8bcd..03666c5 100644
--- a/form.php
+++ b/form.php
@@ -272,6 +272,8 @@ class formfield
$res .= "
\n";
if (is_string ($this->defaults))
$this->defaults = array ($this->defaults);
+ if (count ($this->titles) === 0)
+ $this->titles = array ("");
foreach ($this->titles as $key=>$val)
{
$res .= "
";
@@ -305,17 +307,13 @@ class formfield
$res .= "
\n";
}
- if (isset ($this->errors))
+ if (isset ($this->errors) || isset ($this->help))
{
$res .= "
".
- $this->errors[1]."\n";
- }
- elseif (isset ($this->help))
- {
- $res .= "
".$this->help.
- "\n";
+ $res .= htmlspecialchars ($this->name, ENT_QUOTES)."_help'>";
+ if (isset ($this->help)) $res .= $this->help."
\n";
+ if (isset ($this->errors)) $res .= $this->errors[1];
+ $res .= "\n";
}
$res .= "
\n"; // End controls
$res .= " \n"; // End form-group
@@ -387,17 +385,13 @@ class formfield
$res .= htmlspecialchars ($this->name, ENT_QUOTES)."_help'";
}
$res .= "/>\n";
- if (isset ($this->errors))
+ if (isset ($this->errors) || isset ($this->help))
{
$res .= "