diff --git a/form.php b/form.php index 5732429..8a20f21 100644 --- a/form.php +++ b/form.php @@ -122,6 +122,14 @@ class form // Remove the field CSRF : can not be used outside the form unset ($values[$this->csrfField]); } + if (isset ($_SESSION["domframework"]["form"]["fields"])) + { + foreach ($_SESSION["domframework"]["form"]["fields"] as $field) + { + if ($field->type === "hidden" || $field->readonly !== null) + $values[$field->name] = $field->defaults; + } + } return $values; } @@ -337,7 +345,7 @@ class form } } -/** the definition of a formfield */ +/** The definition of a formfield */ class formfield { /** The form name */