form: if there is errors on hidden fields, display them as text with read-only

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3930 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-09-05 12:09:26 +00:00
parent 7de411e6c3
commit 246cb4d159

View File

@@ -199,6 +199,11 @@ class form
$field->errors = $errors[$field->name]; $field->errors = $errors[$field->name];
else else
$field->errors = array ("error", $errors[$field->name]); $field->errors = array ("error", $errors[$field->name]);
if ($field->type === "hidden")
{
$field->type = "text";
$field->readonly = true;
}
} }
$field->titlewidth = $this->titlewidth; $field->titlewidth = $this->titlewidth;
$field->fieldwidth = $this->fieldwidth; $field->fieldwidth = $this->fieldwidth;