form : if the form contains only checkboxes, manage correctely the focus on first one

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5179 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2019-03-27 15:42:54 +00:00
parent f254c7b339
commit 5fcc1e7694

View File

@@ -376,7 +376,10 @@ class form
{ {
if ($field->type === "hidden" || $field->readonly === true) if ($field->type === "hidden" || $field->readonly === true)
continue; continue;
$focusElement = $field->name; if ($field->titles)
$focusElement = $field->name."_".key ($field->titles);
else
$focusElement = $field->name;
break; break;
} }
if (count ($errors) > 0) if (count ($errors) > 0)