- Posts: 68
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Are we able to view uploaded files within the notification email?
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
8 years 7 months ago #122874
by DOwen
Are we able to view uploaded files within the notification email? was created by DOwen
Hi all,
We would like to see any files uploaded using the Upload File question to appear inside the notification email, preferably as an attachment or a link to the actual document. At the moment, we have entered the {value } for each question inside the notification email template, including the upload file question. However, it simply generates the following:
[{ "title":"Test Doc","comment":"","size":"28.16","name":"Lorem%20ipsum%20-%20test.doc","filename":"fu_3wkjcufh8wvy8s3","ext":"doc" }]
Is there any way that we can actually view the document from within the email and not through the LimeSurvey response page? Not all staff will have access to LimeSurvey itself and need to see the results and view/download the documents.
At the moment we have LimeSurvey set up with ConnectWise, I'm not sure if this makes a difference.
Thanks and looking forward to your support!
We would like to see any files uploaded using the Upload File question to appear inside the notification email, preferably as an attachment or a link to the actual document. At the moment, we have entered the {value } for each question inside the notification email template, including the upload file question. However, it simply generates the following:
[{ "title":"Test Doc","comment":"","size":"28.16","name":"Lorem%20ipsum%20-%20test.doc","filename":"fu_3wkjcufh8wvy8s3","ext":"doc" }]
Is there any way that we can actually view the document from within the email and not through the LimeSurvey response page? Not all staff will have access to LimeSurvey itself and need to see the results and view/download the documents.
At the moment we have LimeSurvey set up with ConnectWise, I'm not sure if this makes a difference.
Thanks and looking forward to your support!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
8 years 7 months ago #122882
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Are we able to view uploaded files within the notification email?
Some previous discussion...
- www.limesurvey.org/en/forum/can-i-do-thi...load-question#122624
- www.limesurvey.org/en/forum/can-i-do-thi...uploaded-file#122453
- www.limesurvey.org/en/forum/can-i-do-thi...load-question#122624
- www.limesurvey.org/en/forum/can-i-do-thi...uploaded-file#122453
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 7 months ago #122884
by DOwen
Replied by DOwen on topic Are we able to view uploaded files within the notification email?
Thanks for this!
I saw the second post already but didn't realise it was relevant.
The other post suggests that I can only display a link which is fine. I'm guessing that inserting the code offered in the forum post will need to be pasted into the appropriate email and will then display a link?
I saw the second post already but didn't realise it was relevant.
The other post suggests that I can only display a link which is fine. I'm guessing that inserting the code offered in the forum post will need to be pasted into the appropriate email and will then display a link?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
8 years 7 months ago #122890
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Are we able to view uploaded files within the notification email?
Try something like this for a complete link in the notification email:
Code:
File uploaded: <a href="http://example.com/limesurvey/upload/surveys/{SID}/files/{stristr(str_replace('filename":"', '', stristr(upload1, 'filename":"')), '"', 'true')}">{stristr(str_replace('name":"', '', stristr(upload1, 'name":"')), '"', 'true')}</a>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 7 months ago #122894
by DOwen
Replied by DOwen on topic Are we able to view uploaded files within the notification email?
Hi thanks for this, although it hasnt worked. It looks like its also muddled up the HTML as I'm seeing code everywhere after the 'File uploaded' section.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
8 years 7 months ago #122896
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Are we able to view uploaded files within the notification email?
I tested and it works for me when the mail is received in Outlook 2013.
Can you give a screenshot of your muddled HTML?
Can you give a screenshot of your muddled HTML?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 7 months ago - 8 years 7 months ago #122898
by DOwen
Replied by DOwen on topic Are we able to view uploaded files within the notification email?
Last edit: 8 years 7 months ago by DOwen. Reason: Editedlink
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
8 years 7 months ago #122900
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Are we able to view uploaded files within the notification email?
Sorry, I have no idea what's causing that.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 7 months ago - 8 years 7 months ago #122921
by DOwen
Replied by DOwen on topic Are we able to view uploaded files within the notification email?
OK I've made a little bit of progress. I've attached another image. I'm not that familiar with JS, so do I change the example.com link to something else as its appearing in the email?
There's also some unusual behaviour which is difficult to describe. I have 3 faux-groups of questions (all in one question group, but 1 of 3 different sets of questions appear depending on the answer to the first question), so I've repeated the link code you gave me three times, adjusting the curly bracket code on each one. However after saving the email template, it seems to completely remove the whole 2nd section, almost as if its caused by the link code.
There's also some unusual behaviour which is difficult to describe. I have 3 faux-groups of questions (all in one question group, but 1 of 3 different sets of questions appear depending on the answer to the first question), so I've repeated the link code you gave me three times, adjusting the curly bracket code on each one. However after saving the email template, it seems to completely remove the whole 2nd section, almost as if its caused by the link code.
Last edit: 8 years 7 months ago by DOwen.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
8 years 7 months ago - 8 years 7 months ago #122930
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Are we able to view uploaded files within the notification email?
There is no JavaScript here. You will need to replace example.com/limesurvey with the path to your LimeSurvey installation.I'm not that familiar with JS, so do I change the example.com link to something else as its appearing in the email?
Can you post the complete source code from the email template?There's also some unusual behaviour which is difficult to describe...
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 7 months ago by tpartner.
The topic has been locked.
- DOwen
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 68
- Thank you received: 0
8 years 7 months ago #122939
by DOwen
Replied by DOwen on topic Are we able to view uploaded files within the notification email?
Aha sorry misunderstood that! I've tried using our installation path, but getting an Object Not Found error page when I click the now appearing link.
I've attached two files, one containing the original source code that I'm entering, and another containing the source code after I've clicked save and/or logged back into admin after receiving the emails. As it appears to be changing quite a bit.
Thanks!
I've attached two files, one containing the original source code that I'm entering, and another containing the source code after I've clicked save and/or logged back into admin after receiving the emails. As it appears to be changing quite a bit.
Thanks!
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
8 years 7 months ago #122941
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Are we able to view uploaded files within the notification email?
I don't know why your editor is doing that. Try disabling the editor (Edit personal preferences --> HTML editor mode --> Popup HTML editor) and saving the source code again.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.