From a9295d0fe58267aa2f80eb1ece037d7dbb8fce9f Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Thu, 20 Nov 2014 20:02:43 +0000 Subject: [PATCH] form : the submit text can be defined in the label too git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1874 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- form.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/form.php b/form.php index 41ccb7d..e3ca724 100644 --- a/form.php +++ b/form.php @@ -455,6 +455,8 @@ die ("FORM/VERIFY : UNUSED and dirty\n"); if (isset ($field->defaults)) $res .= " value='".htmlspecialchars ($field->defaults, ENT_QUOTES). "'"; + elseif (isset ($field->label)) + $res .= " value='".htmlspecialchars ($field->label, ENT_QUOTES)."'"; $res .= " class='form-control btn-primary'"; if (isset ($field->hidden) && $field->hidden !== FALSE) $res .= " style='display:none'";