Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Conditional end message

More
5 years 1 month ago #163738 by spiceaw
Hi,

I'm trying to set a conditional end message, where based on earlier questions I define what to display in end message.

I followed a previous recommandation from Denis :
- Defined a text question (Positive), hidden, with content I want displayed (contains img and script)
- I define for that text question conditions (e.g. question 3 to yes)
- I put in end message {Positive}

If I don't hide my Positive text question, this one appears properly when the condition is met.
But when I hide it and get to the end of the survey, I don't have Positive displayed.

Is there a restriction on what kind of content can be visible in the end message?

Thanks,
Julien
The topic has been locked.
More
5 years 1 month ago - 5 years 1 month ago #163741 by Ben_V
Replied by Ben_V on topic Conditional end message
Hi,
try to hide your question using javascript rather than advanced setting (set always visible).

Please paste this snippet in the help textarea for this question
Code:
<script>  
  $(document).ready(function() {
    $('#question{QID}').hide();
  });    
</script>

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 5 years 1 month ago by Ben_V.
The topic has been locked.
More
5 years 1 month ago - 5 years 1 month ago #163743 by holch
Replied by holch on topic Conditional end message
[strike]You don't actually need to hide the question. If you use the correct condition or relevance equation (better!) the question only appears if a certain condition is met. If you hide the question via the system it will NEVER be shown, no matter what the condition says.[/strike]
Sorry, I didn't think this through. The hiding is necessary because of the usage in the end message.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 5 years 1 month ago by holch.
The topic has been locked.
More
5 years 1 month ago #163756 by spiceaw
Replied by spiceaw on topic Conditional end message
Thanks for your suggestions.

I tried setting the question visible and put the js in the help. It doesn't hide the question.
In any case, I still don't see the question text in my end message.

I did a basic testing with
Code:
Code:  Test
Question:  Test is working
Help:  
Type:  Text display

In the end Message I have
Code:
We thank you for completing this survey.
{Test}

Test is not displayed in the End Message.
It must be the way I'm calling the question text that is not correct.
Is {Test} not the way to do it?
The topic has been locked.
More
5 years 1 month ago #163760 by jelo
Replied by jelo on topic Conditional end message
Please attach a small survey with the relevant parts.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
More
5 years 1 month ago #163761 by spiceaw
Replied by spiceaw on topic Conditional end message
Here is an export of the relevant part

File Attachment:

File Name: limesurvey...6182.lss
File Size:37 KB
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose