Skip to content

Commit

Permalink
NEW Add extension hooks to update submitted form fields before proces…
Browse files Browse the repository at this point in the history
…sing
  • Loading branch information
michalkleiner committed May 21, 2021
1 parent d8ab742 commit 35814ea
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('updateSubmittedFileField', $field);

return $field;
}

/**
Expand Down

0 comments on commit 35814ea

Please sign in to comment.