From 0b3d6213174d3d48b1a7063d2227ba6ded1a2576 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Tue, 12 May 2015 08:09:28 +0000 Subject: [PATCH] form : add the prefix to allow the form to be subitted in array git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2165 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- form.php | 163 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 110 insertions(+), 53 deletions(-) diff --git a/form.php b/form.php index 06bfb9a..b07bd35 100644 --- a/form.php +++ b/form.php @@ -59,6 +59,8 @@ class form to check the defaults per example - [mandatory] : boolean to add a red star at end of label - [hidden] : hide the field (add a style='display:hidden' to the field) + - [prefix] : the prefix added to the name (in XXX/YYY/ZZZ form). + Will form an array to the result @param array $fields The fields to be displayed */ @@ -171,7 +173,6 @@ die ("FORM/VERIFY : UNUSED and dirty\n"); public function printHTML ($method = 'post', $values = NULL, $errors = array()) { - // TODO : textarea, file $this->method = strtolower ($method); $res = ""; $res = "
name][0]; $res .= "'>\n"; $res .= "