Ignoring Unanswered Questions

More
3 months 1 week ago #158283 by kitandaTest
kitandaTest created the topic: Ignoring Unanswered Questions
Is there any way to make it so that when my survey is filled out and the results are sent to my email, only answered questions are displayed? Is there any way at all to, when viewing survey responses, hide all unanswered questions?

Please Log in to join the conversation.

More
3 months 1 week ago #158285 by tpartner
tpartner replied the topic: Ignoring Unanswered Questions
1) You can modify the email template and use Expression Manager to only list answered questions.

2) No.

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 months 1 week ago #158313 by kitandaTest
kitandaTest replied the topic: Ignoring Unanswered Questions
How exactly could I use Expression Manager to modify what is passed to the email template? I can't seem to find anything in the manual about that sort of thing.
Also, Thanks!

Please Log in to join the conversation.

More
3 months 1 week ago #158315 by tpartner
tpartner replied the topic: Ignoring Unanswered Questions
I have no way of knowing what your survey consists of but there are many examples in the documentation and in these forums.

Perhaps, something like this (untested) example:
<ul>
	{if(is_empty(Q1), '<li>'+Q1.question+': '+Q1.shown+'</li>', '')}
	{if(is_empty(Q2), '<li>'+Q2.question+': '+Q2.shown+'</li>', '')}
	{if(is_empty(Q3), '<li>'+Q3.question+': '+Q3.shown+'</li>', '')}
</ul>

- manual.limesurvey.org/Email_templates
- manual.limesurvey.org/Expression_Manager#Tailoring.2FPiping
- manual.limesurvey.org/Expression_Manager..._.7BINSERTANS:xxx.7D

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, kitandaTest

Please Log in to join the conversation.

More
3 months 1 week ago - 3 months 1 week ago #158369 by kitandaTest
kitandaTest replied the topic: Ignoring Unanswered Questions
Sorry for the really basic question, this is all very new to me. I'm just not sure how to actually access the Expression Manager. I've used the template editor before, but I'm sure that's a different thing, and I see where you would put a relevance equation, but I don't know how to get to the actual code that gathers and processes all the data. Am I just supposed to download the LimeSurvey files and edit those?
The way people talk about the Expression Manager makes it sound like a tool similar to the Template Editor, but I can't seem to actually find a tool called "Expression Manager" anywhere in the admin page. The manual seems to say to go under "tools". I assume I'm going to the wrong "tools" menu, but it's the only one I can find.
Attachments:
Last Edit: 3 months 1 week ago by kitandaTest. Reason: The screenshots uploaded twice each.

Please Log in to join the conversation.

More
3 months 1 week ago #158372 by tpartner
tpartner replied the topic: Ignoring Unanswered Questions
You would edit the email template(s) as indicated in the first link above.

Expression Manager is not a tool you can select in the editors. It allows for the insertion of variables and functions (wrapped in curly braces) into the various text elements and email templates.

The example above shows a possible way to render list rows depending on whether a question is answered.

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.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!