Getting a survey response into Admin Notification subject line or attribute

More
3 years 5 months ago #105695 by jsavage
jsavage created the topic: Getting a survey response into Admin Notification subject line or attribute
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

Please Log in to join the conversation.

More
3 years 5 months ago #105707 by tpartner
tpartner replied the 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:

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

Please Log in to join the conversation.

More
3 years 5 months ago #105710 by DenisChenu
DenisChenu replied the topic: Getting a survey response into Admin Notification subject line or attribute

tpartner wrote: You cannot write survey responses to the tokens table without an AJAX call to a remote PHP script.

Or with the new event : afterSurveyComplete ;)
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 5 months ago #105714 by tpartner
tpartner replied the 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.

Please Log in to join the conversation.

More
3 years 5 months ago #105719 by jsavage
jsavage replied the topic: Getting a survey response into Admin Notification subject line or attribute
sounds promissing. Will take a look.
James

Please Log in to join the conversation.

More
3 years 5 months ago #105723 by DenisChenu
DenisChenu replied the topic: Getting a survey response into Admin Notification subject line or attribute

tpartner wrote: That would be great if I could actually get a plugin to work.

I don't actually test afterSurveyComplete, but did you try ShowResponse plugin ?
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 5 months ago #105740 by jsavage
jsavage replied the 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

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now