- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Getting a survey response into Admin Notification subject line or attribute
- jsavage
- Topic Author
- Offline
- New Member
Less
More
10 years 1 month ago #105695
by jsavage
Getting a survey response into Admin Notification subject line or attribute was created by jsavage
I have seen how it is possible to pre-populate survey answers with attributes.
Is it possible to do the reverse and place a response into an attribute? This is simply to make it easier to get an indication of high level results in the email box or in the Token Management Area.
Lets take the simplest example - a survey with one question and a Yes/No answer. My survey has an additional attrribute called response1.
1. How can I get the answer to Question 1 rto be placed back into the attribute response1 ?
2. if that is not possible, then how about displaying the answer Y/N in the subject line of the notification?
Thanks all,
James
Is it possible to do the reverse and place a response into an attribute? This is simply to make it easier to get an indication of high level results in the email box or in the Token Management Area.
Lets take the simplest example - a survey with one question and a Yes/No answer. My survey has an additional attrribute called response1.
1. How can I get the answer to Question 1 rto be placed back into the attribute response1 ?
2. if that is not possible, then how about displaying the answer Y/N in the subject line of the notification?
Thanks all,
James
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
10 years 1 month ago #105707
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 Getting a survey response into Admin Notification subject line or attribute
You cannot write survey responses to the tokens table without an AJAX call to a remote PHP script.
However, in the email editor you can use Expression Manager to pipe responses into the subject line (or in the mail body) like this:
.
However, in the email editor you can use Expression Manager to pipe responses into the subject line (or in the mail body) like this:
Code:
Response submission for survey {SURVEYNAME}. Q1 answer: {q1.shown}
.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: jsavage
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13642
- Thank you received: 2491
10 years 1 month ago #105710
by DenisChenu
manual.limesurvey.org/Plugin_events
Denis
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 .
I don't answer to private message.
Replied by DenisChenu on topic Getting a survey response into Admin Notification subject line or attribute
Or with the new event : afterSurveyCompletetpartner wrote: You cannot write survey responses to the tokens table without an AJAX call to a remote PHP script.
manual.limesurvey.org/Plugin_events
Denis
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 .
I don't answer to private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
10 years 1 month ago #105714
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 Getting a survey response into Admin Notification subject line or attribute
That would be great if I could actually get a plugin to work.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- jsavage
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
10 years 1 month ago #105719
by jsavage
Replied by jsavage on topic Getting a survey response into Admin Notification subject line or attribute
sounds promissing. Will take a look.
James
James
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13642
- Thank you received: 2491
10 years 1 month ago #105723
by DenisChenu
You need to move it from plugins/demo/ to plugins/ directory.
He use pluginManager->getAPI()->getResponse, seems promising
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 .
I don't answer to private message.
Replied by DenisChenu on topic Getting a survey response into Admin Notification subject line or attribute
I don't actually test afterSurveyComplete, but did you try ShowResponse plugin ?tpartner wrote: That would be great if I could actually get a plugin to work.
You need to move it from plugins/demo/ to plugins/ directory.
He use pluginManager->getAPI()->getResponse, seems promising
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 .
I don't answer to private message.
The topic has been locked.
- jsavage
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
10 years 1 month ago #105740
by jsavage
Replied by jsavage on topic Getting a survey response into Admin Notification subject line or attribute
OK - Have that plug in activated but I haven't found any documentation for it. I would even be happy to write the documentation if I could only someone could explain how it is supposed to be used.
Kind regards,
James
Kind regards,
James
The topic has been locked.