Missing Information from Form Submission Email - version 8.5.1 - BUG
I have set-up a new site with a form, with a file upload option. Before when you did this it would email a Link to download the Uploaded file in the Form Submission email.
And on my other sites it does this. But on this version it seems to be missing both the download link , and the form submission links.
" To view all of this form's submissions, visit www.www.*****.co.uk/dashboard/reports/forms/view/88... "
And the file uploaded
" Attach Your CV
Both of these seem to be missing on the lastest version. They worked fine on all the other versions. I have the same type of from on a version 8.4.3 But on the lastest version 8.5.1 Its not working?
I have checked that the file block_form_submissions.php is the same and appears to be identical?
If you're using an Express form, it will only show links to files if you checked the box "Store submitted results of form." under the tab "Results" when editing your form.
I am using the standard form type - NOT legacy I believe. (as the legacy section is empty on the form results section)
I also have the option "Store Submitted Results of form" already ticked, and the form results are all on the reports page. And the Express Folder to receive form results Ticked.
I have a duplicate set-up on anther site so i know it works.... Only difference is the versions.
In your dashboard go to dashboard/system/environment/logging and make sure that, under "Channel Logging" you have checked the option to log emails sent.
If it is checked, go to your log page dashboard/reports/logs and there you will see the exact emails being sent if you want to compare with what you're receiving.
As far as I know those email templates haven't changed over time so it may be that your email template is overridden.
Check in application/mail to see if you have email templates there overridding the normal ones.
I had the logs already enabled, So i can see the emails are the same. It is like the default template is being overridden somewhere.
But Apps/emails is empty? and the ones in concrete/emails seem to be identical to my other versions.
But now i tried to override it with a modded template for block_form_submission.php - in their it doesnt seem to override ever?
I have now overwritten the default and i see their is an If statement for if dataSaveEnabled.
This is not working as this setting is active and if I remove the "if statement" i get the links and the email correctly? with the link to view submissions - But the link to file is still missing?
So getting closer but it appears i found the problem at least? now hwo to check if datasaveenabled is set? in the database?
It is set based on the value of storeFormSubmission from your form block.
In your express_form block controller if you look at the function areFormSubmissionsStored() and getFormSubmissionConfigValue() you will see that it also relies on the config value concrete.form.store_form_submissions
- if concrete.form.store_form_submissions is set to true the files will be added to the message
- else if concrete.form.store_form_submissions is set to 'auto' your block setting will prevail
- else if concrete.form.store_form_submissions is set to false or not set your files won't be added.
So to make sure your files are added you have to set concrete.form.store_form_submissions either to true which will make all emails be the same or to 'auto' which will allow each block to use different settings.
to set concrete.form.store_form_submissions you open the file application/config/generated_overrides/concrete.php and in the array you add this to the array that's already there
'form' => [ 'store_form_submissions' => 'auto', ],
or if you want to set it to true do this instead
'form' => [ 'store_form_submissions' => true, ],
notice no quotation marks around true.
One thing that is weird though is that by default that value is already set to 'auto' so it should already be working but try it anyway you never know