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:
2
form.php
2
form.php
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user