Welcome to the LimeSurvey Community Forum

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

Multiple Choice Survey With Message

  • abredevo
  • abredevo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 5 months ago #232930 by abredevo
Multiple Choice Survey With Message was created by abredevo
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hi, I am trying to set up a survey, I have Q1 working where I have a message to show if the user selects option 1 or 2 using {if (Q1_Q1A.code == 'Y' , 'Message displayed.' )}.
Q2 it is a multiple choice, depending on the amount they select I want a different message to appear. Can you help please? I tried using {count(that.Q2.NAOK)>2 , 'New message to appear.'} but it doesn't work. 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 5 months ago #232931 by Joffm
Replied by Joffm on topic Multiple Choice Survey With Message
Sorry, this is a bit confusing.
1. Why didn't you answer the questions at the start?

2. Where do you want this messages to appear?
As a validation tip?
As a popup or an alert?

So you rerally should send these questions as a lss export to show us what you are trying to achieve.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • abredevo
  • abredevo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 5 months ago - 1 year 5 months ago #232933 by abredevo
Replied by abredevo on topic Multiple Choice Survey With Message
Your LimeSurvey version:Version 5.4.5+221010
Own server or LimeSurvey hosting: Own server

Hi, sorry I have exported as lss now. 

I currently have the message appear as a report at the end of the questionnaire. The second message appears all the time, but I would like it to appear when more than 2 options have been ticked in Q2. I hope this makes sense
Last edit: 1 year 5 months ago by abredevo. Reason: Forgot to add information

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 5 months ago #232940 by Joffm
Replied by Joffm on topic Multiple Choice Survey With Message
Hi,
1. Why is Q1 a multiple question if only one answer is allowed?

2. It doesn't work because you didn't do what you said "If the count is >2, then..."
So you have to use an IF statement

{if(count(that.Q2.NAOK)>2 , 'Message 2 to appear','')}

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • abredevo
  • abredevo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 5 months ago #233193 by abredevo
Replied by abredevo on topic Multiple Choice Survey With Message
Is it possible to have styling within the 'message 2 to appear' such as a bullet list? I have tried by using <ul> <li> but I get errors with it. 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 5 months ago #233194 by Joffm
Replied by Joffm on topic Multiple Choice Survey With Message

I have tried by using <ul> <li> but I get errors with it. 

Which errors?
Please, always show us what you did.
We have no crystal ball.

Because I do not see an issue.
 

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • abredevo
  • abredevo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 5 months ago - 1 year 5 months ago #233195 by abredevo
Replied by abredevo on topic Multiple Choice Survey With Message
     

You can see how I have put the text in the message and when I view source it doesn't like the closing p tag. When I go to view the message in the survey it then comes up with errors
Last edit: 1 year 5 months ago by abredevo. Reason: Uploaded images incorrectly

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 5 months ago #233197 by Joffm
Replied by Joffm on topic Multiple Choice Survey With Message
Sorry, but you obviously changed the type of your question Q1.
What is it now?

But as you see, you have two opening <p> tags (the very first and then before "Consider".
No issue with something like (shortend example):
{if(Q1_Q1A=='Y','<p><strong>Assessment:</strong> Champions or experts ...</p><p><strong>Consider</strong></p><ul><li>The extra burdern</li><li>The need to keep</li></ul></p>','')}
 
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: abredevo

Please Log in to join the conversation.

  • abredevo
  • abredevo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 5 months ago #233284 by abredevo
Replied by abredevo on topic Multiple Choice Survey With Message
Thank you for your help. I didn't realise that there was a settings in my account for source code. It is now working

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose