From f10cd0c338cab76b08572334d504785b79ae0034 Mon Sep 17 00:00:00 2001 From: Michal Kleiner Date: Wed, 28 Apr 2021 17:44:19 +1200 Subject: [PATCH] Add extension hooks to update submitted form fields before processing --- code/Model/EditableFormField.php | 6 +++++- code/Model/EditableFormField/EditableFileField.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/Model/EditableFormField.php b/code/Model/EditableFormField.php index f923b8701..732853323 100755 --- a/code/Model/EditableFormField.php +++ b/code/Model/EditableFormField.php @@ -792,7 +792,11 @@ protected function updateFormField($field) */ public function getSubmittedFormField() { - return SubmittedFormField::create(); + $field = SubmittedFormField::create(); + + $this->extend('updateSubmittedFormField', $field); + + return $field; } diff --git a/code/Model/EditableFormField/EditableFileField.php b/code/Model/EditableFormField/EditableFileField.php index eb5222664..62d5a1d2d 100755 --- a/code/Model/EditableFormField/EditableFileField.php +++ b/code/Model/EditableFormField/EditableFileField.php @@ -246,7 +246,11 @@ public function getValueFromData() public function getSubmittedFormField() { - return SubmittedFileField::create(); + $field = SubmittedFileField::create(); + + $this->extend('updateSubmittedFormField', $field); + + return $field; } /**