Skip to content

Commit

Permalink
Add extension hooks to update submitted form fields before processing
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkleiner committed Apr 28, 2021
1 parent d8ab742 commit f10cd0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion code/Model/EditableFormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,11 @@ protected function updateFormField($field)
*/
public function getSubmittedFormField()
{
return SubmittedFormField::create();
$field = SubmittedFormField::create();

$this->extend('updateSubmittedFormField', $field);

return $field;
}


Expand Down
6 changes: 5 additions & 1 deletion code/Model/EditableFormField/EditableFileField.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ public function getValueFromData()

public function getSubmittedFormField()
{
return SubmittedFileField::create();
$field = SubmittedFileField::create();

$this->extend('updateSubmittedFormField', $field);

return $field;
}

/**
Expand Down

0 comments on commit f10cd0c

Please sign in to comment.