From 49be386c5f6fe890ee0417e2ceb2011a9a429afc Mon Sep 17 00:00:00 2001 From: hazzeldorn Date: Thu, 18 Jul 2024 17:07:44 +0200 Subject: [PATCH] bugfix: field value reset on files was done wrong --- src/HazzelForms/Field/File/File.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/HazzelForms/Field/File/File.php b/src/HazzelForms/Field/File/File.php index 33891a1..b4673fc 100644 --- a/src/HazzelForms/Field/File/File.php +++ b/src/HazzelForms/Field/File/File.php @@ -68,6 +68,12 @@ public function returnField() return sprintf('', $this->fieldType, $this->formName, $this->fieldSlug, $this->classlist, $this->buildAttributeString()); } + public function clear() + { + // override string reset + $this->fieldValue = []; + } + public function getValue() { /* override because html_entity_decode should not be run for files */