From 246cb4d159ceaf81cfc743af9b9e25491a98bd1d Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Tue, 5 Sep 2017 12:09:26 +0000 Subject: [PATCH] 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 --- form.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/form.php b/form.php index 2db56bc..e42a942 100644 --- a/form.php +++ b/form.php @@ -199,6 +199,11 @@ class form $field->errors = $errors[$field->name]; else $field->errors = array ("error", $errors[$field->name]); + if ($field->type === "hidden") + { + $field->type = "text"; + $field->readonly = true; + } } $field->titlewidth = $this->titlewidth; $field->fieldwidth = $this->fieldwidth;