mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Add updateEmailData hook
This commit is contained in:
parent
03adf3e258
commit
f90b997c29
@ -976,12 +976,14 @@ JS
|
|||||||
"Sender" => Member::currentUser(),
|
"Sender" => Member::currentUser(),
|
||||||
"Fields" => $submittedFields
|
"Fields" => $submittedFields
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$this->extend('updateEmailData', $emailData, $attachments);
|
||||||
|
|
||||||
// email users on submit.
|
// email users on submit.
|
||||||
if($recipients = $this->FilteredEmailRecipients($data, $form)) {
|
if($recipients = $this->FilteredEmailRecipients($data, $form)) {
|
||||||
$email = new UserDefinedForm_SubmittedFormEmail($submittedFields);
|
$email = new UserDefinedForm_SubmittedFormEmail($submittedFields);
|
||||||
|
|
||||||
if($attachments){
|
if($attachments) {
|
||||||
foreach($attachments as $file) {
|
foreach($attachments as $file) {
|
||||||
if($file->ID != 0) {
|
if($file->ID != 0) {
|
||||||
$email->attachFile(
|
$email->attachFile(
|
||||||
|
Loading…
Reference in New Issue
Block a user