Skip to content

Commit

Permalink
bugfix: field value reset on files was done wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
hazzeldorn committed Jul 18, 2024
1 parent 4a0f0ca commit 49be386
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/HazzelForms/Field/File/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ public function returnField()
return sprintf('<input type="%1$s" id="%2$s-%3$s" name="%2$s[%3$s][]" class="%4$s" %5$s />', $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 */
Expand Down

0 comments on commit 49be386

Please sign in to comment.