From 2dfb75ee72118275927437ee7e813ec5da48fd8f Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 21 Sep 2016 10:00:46 +0000 Subject: [PATCH] form : put the focus on first field NOT readonly and NOT hidden git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3060 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/form.php b/form.php index d8831c4..142b1c2 100644 --- a/form.php +++ b/form.php @@ -221,7 +221,7 @@ class form // the first error fields when there is one foreach ($this->fields as $field) { - if ($field->type !== "hidden") + if ($field->type !== "hidden" && $field->readonly !== true) break; } $focusElement = $field->name;