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
This commit is contained in:
2016-09-21 10:00:46 +00:00
parent 230dcf9409
commit 2dfb75ee72

View File

@@ -221,7 +221,7 @@ class form
// the first error fields when there is one // the first error fields when there is one
foreach ($this->fields as $field) foreach ($this->fields as $field)
{ {
if ($field->type !== "hidden") if ($field->type !== "hidden" && $field->readonly !== true)
break; break;
} }
$focusElement = $field->name; $focusElement = $field->name;