diff --git a/form.php b/form.php index d1c6980..e11d46a 100644 --- a/form.php +++ b/form.php @@ -46,7 +46,7 @@ class form test from main tests to minor tests. \$tmpfield can be used as a copy of the current field, to check the defaults per example - - [error] : array containing (error|warning) => message + - [mandatory] : boolean to add a red start at end of label @param array $fields The fields to be displayed */ @@ -144,7 +144,12 @@ class form $res .= " \n"; + $res .= htmlspecialchars ($field->label); + if (isset ($field->mandatory) && $field->mandatory !== FALSE) + $res .= " *"; + else + $res .= " "; + $res .= "\n"; $res .= "