Include attachements in Send form submissions
Went thought permissions and such, but cant find anything out of the ordinary.
Should version 8.5.1 include these attachment fields by default?
When in block_express_form_submission.php I remove: $dataSaveEnabled && on line 11 attachments are included in the emails.
Its a hack, someone has the solution though?
The problem is the controller doesn't actually have that variable. It doesn't exist.
So since $saveData in the block's controller doesn't exist, $dataSaveEnabled in the email template is always false.
And since blocks are not instantiated using Laravel's container there is no graceful way fo dealing with that.
So the way to deal with the problem is to copy the email template concrete\mail\block_express_form_submission.php and put the copy inside application\mail\block_express_form_submission.php
Then modify the copy by adding at the top
$dataSaveEnabled = true;
Now C5 will use your copy of the template. It's still the same hack you're using pretty much but you won't break anything or loose your modification next time you upgrade C5.