From 5fcc1e76943a2eb053ed66ab3ca1d93d5fcbca5d Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 27 Mar 2019 15:42:54 +0000 Subject: [PATCH] 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 --- form.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/form.php b/form.php index 0dae6fd..e45fad0 100644 --- a/form.php +++ b/form.php @@ -376,7 +376,10 @@ class form { if ($field->type === "hidden" || $field->readonly === true) continue; - $focusElement = $field->name; + if ($field->titles) + $focusElement = $field->name."_".key ($field->titles); + else + $focusElement = $field->name; break; } if (count ($errors) > 0)