From 77a6f60de4975a43e22f6ea4901061f9aac2dd4f Mon Sep 17 00:00:00 2001 From: Deltacms Date: Mon, 8 Jan 2024 11:42:55 +0100 Subject: [PATCH] =?UTF-8?q?r=C3=A9initialisation=20des=20variables=20de=20?= =?UTF-8?q?session?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/form/form.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/module/form/form.php b/module/form/form.php index d1df2a6..9da2be1 100644 --- a/module/form/form.php +++ b/module/form/form.php @@ -630,7 +630,16 @@ class form extends common { $redirect = helper::baseUrl() . $this->getUrl(0); if ( $this->getData(['module', $this->getUrl(0), 'config', 'pageId']) !== '') $redirect = helper::baseUrl() . $this->getData(['module', $this->getUrl(0), 'config', 'pageId']); // Effacement des données provisoires - if( self::$inputNotices === [] )$_SESSION['draft']=[]; + if( self::$inputNotices === [] ){ + $_SESSION['draft'] = []; + $_SESSION['draft']['mail'] = ""; + $_SESSION['draft']['textarea'] = ""; + $_SESSION['draft']['datetime'] = null; + $_SESSION['draft']['checkbox'] = []; + $_SESSION['draft']['select'] = []; + $_SESSION['draft']['text'] = []; + $_SESSION['draft']['file'] = ""; + } } else { $sent = false; }