Welcome to the LimeSurvey Community Forum

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

Multiple Choice Survey With Message

More
2 years 10 months ago #232930 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.

More
2 years 10 months ago #232931 by Joffm
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.

More
2 years 10 months ago - 2 years 10 months ago #232933 by abredevo
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: 2 years 10 months ago by abredevo. Reason: Forgot to add information

Please Log in to join the conversation.

More
2 years 10 months ago #232940 by Joffm
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.

More
2 years 10 months ago #233193 by abredevo
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.

More
2 years 10 months ago #233194 by Joffm

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.

More
2 years 10 months ago - 2 years 10 months ago #233195 by abredevo
     

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: 2 years 10 months ago by abredevo. Reason: Uploaded images incorrectly

Please Log in to join the conversation.

More
2 years 10 months ago #233197 by Joffm
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.

More
2 years 10 months ago #233284 by abredevo
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.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose