Send response pdf in email

More
1 month 4 weeks ago #189710 by oledole
Hi.

I wanted to know if it is possible to send a response pdf in an email. What I mean is that once a survey has been answered and a response has been saved that response will be sent in an email (either a new one or for example with the admin notification emails). This is similar to the https://framagit.org/SondagePro-LimeSurvey-plugin/pdfReport/tree/master/pdfReport plugin which let you send the generated pdf as an attachement. This pdf would need to be accessible by someone that is not a limesurvey admin (for example as attachement like the plugin).

Thank you for your time.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
1 month 3 weeks ago #189735 by DenisChenu
I have a project to allow pdfReport by a twig file automatically with an automatic twig file. But it take a lot of time …

And currently no client.

I think it don't exist a way currently except cretae your own code.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: oledole

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #189763 by gabrieljenik
Sorry, don't understand the problem. I have PDF plugins but initially Dennis' plugin looks a good way to go. So, if you could clarify the problem, would be very helpful.

Thanks

Cheers,
Gabriel - www.Encuesta.Biz - Authorized Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?)....[img]

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #189764 by oledole
Replied by oledole on topic Send response pdf in email
Hi. I'll try to explain.

When a participant finish a survey his response is saved. From what I can see limesurvey can generate PDF from this that you can download from the response page on limesurvey and from print your answer page inside the survey.

What I wanted to do was to send such a generated PDF to a specific email address (for example the admin mail in that survey) as an attachment in an email. It would also be fine if it was a link to the survey or something, but it would need to be accessible for someone that doesn't have access to limesurvey (e.g don't have an admin user).

The plugin I linked does something similar but you need to create your own PDF report in the question text instead of being able to just use the ones Limesurvey already makes. While that is better if we want to customize our reports I wanted to know if there was another way to do it with the generated pdf from limesurvey instead.

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #189776 by gabrieljenik
I see. Thanks. Yes, that should be possible with some coding. Contact me at This email address is being protected from spambots. You need JavaScript enabled to view it. and we can discuss further. What do you think? Thanks

Cheers,
Gabriel - www.Encuesta.Biz - Authorized Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?)....[img]
The following user(s) said Thank You: oledole

Please Log in or Create an account to join the conversation.

More
3 weeks 5 days ago #190977 by rickanderson
Hi...

I am looking for some similar functionality. Once the survey is complete the results are used to generate a report in the 'End Message'. This html page is successfully converted to a PDF using the 'html2pdf.js' script. I wondered if there is some way to include an input field on this End Message report page with a button that will likewise encode the PDF and attach to an email which is then sent to the email address in the input field. Is there an Email Method within LimeSurvey which will facilitate this?

Cheers...Rick.

Please Log in or Create an account to join the conversation.

More
3 weeks 5 days ago #190978 by gabrieljenik

Cheers,
Gabriel - www.Encuesta.Biz - Authorized Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?)....[img]
The following user(s) said Thank You: rickanderson

Please Log in or Create an account to join the conversation.

More
3 weeks 5 days ago #190979 by rickanderson
Hi Gabriel...thanks for the speedy response!

As things stand I am able to successfully generate the PDF and have included a button to prompt the user to download which also works fine. This looks like what pdfReport would do for me? I would like to be able to include this PDF as an attachment to a user-supplied email address. I believe I can use 'html2PDF' to convert the PDF to a Data URI String as per this code (from html2PDF support):

html2pdf().from(element).toPdf().output('datauristring').then(function (pdfAsString) {
    // The PDF has been converted to a Data URI string and passed to this function.
    // Use pdfAsString however you like (send as email, etc)! For instance:
    console.log(pdfAsString);
});

I would like to know if there is email functionality within LimeSurvey to enable the attachment of this to an email being sent to the user-supplied email address? Wasn't sure from your link if pdfReport would add this capability.

Cheers...Rick.

Please Log in or Create an account to join the conversation.

More
3 weeks 4 days ago #190994 by DenisChenu

rickanderson wrote: I would like to know if there is email functionality within LimeSurvey to enable the attachment of this to an email being sent to the user-supplied email address? Wasn't sure from your link if pdfReport would add this capability.
.

Best is to test : pdfReport is done to
1. Save pdf inside survey
2. Send (optionnaly) the pdf to an email (generated with Expression)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: rickanderson

Please Log in or Create an account to join the conversation.

More
3 weeks 4 days ago #191007 by rickanderson
Thanks both Denis and Gabriel.

I'll look into what I can do with pdfReport.

Cheers...Rick.

Please Log in or Create an account to join the conversation.

More
3 weeks 4 days ago #191034 by rickanderson
Hi again Denis...quick question re pdfReport.

What version of LimeSurvey do i need to be running to use pdfReport? I am currently running v3.19.3.

I uploaded the pdfReport files to the plugin directory and added a 'File Upload' type question but don't see where I Activate pdfReport (Activate pdfReport : Use this question as pdf report. to Yes).

Cheers

...Rick.

Please Log in or Create an account to join the conversation.

More
3 weeks 4 days ago #191036 by gabrieljenik
Great, let me know if you need some custom PDF solutions. Thanks!

Cheers,
Gabriel - www.Encuesta.Biz - Authorized Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?)....[img]

Please Log in or Create an account to join the conversation.

More
3 weeks 4 days ago #191039 by DenisChenu

rickanderson wrote: What version of LimeSurvey do i need to be running to use pdfReport? I am currently running v3.19.3.

I just check : options are shown in 3.19.3 git version : no issue

rickanderson wrote: I uploaded the pdfReport files to the plugin directory and added a 'File Upload' type question but don't see where I Activate pdfReport (Activate pdfReport : Use this question as pdf report. to Yes)..

You must activate the plugin before
extensions.sondages.pro/about/install-an...-for-limesurvey.html

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
Attachments:
The following user(s) said Thank You: rickanderson

Please Log in or Create an account to join the conversation.

More
3 weeks 4 days ago #191041 by rickanderson
Cheers Denis...much appreciated, I wasn't aware that plugins had to be specifically activated after upload to 'plugins' directory.

...Rick.

Please Log in or Create an account to join the conversation.

More
3 weeks 3 days ago #191113 by rickanderson
Hi Denis...thanks for your help so far, I have a couple of final pdfReport questions that you may be able to help me with?

I imported your Demo ('pdfreport test survey') to see how you implemented pdfReport and think I am almost good to go. I can't see where the final link on the end page (once survey submitted after End Message) 'Print your answers.' is being added, is this automatically generated?

Also, I assume the emails are only sent if the survey is active as I haven't received any emails yet from testing, is this correct?

Thanks again!

Cheers...Rick.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!