Welcome to the LimeSurvey Community Forum

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

Display the picture according to the answer

  • surveySn
  • surveySn's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 months ago #210138 by surveySn
hello everyone,

3.22.11+200330


if Q1=A1,Q2 problem display picture 1
if Q1=A2,Q2 problem display picture 2
if Q1=A3,Q2 problem display picture 3
if Q1=A4,Q2 problem display picture 4
if Q1=A5,Q2 problem display picture 1、2、3、4

Can it be realized?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 3 months ago #210140 by Joffm
Hi,
you want to display the picture in the question text?
Do it the usual way
Code:
<img src="/upload/surveys/761949/images/Boot001_klein.jpg" />

And to show the image according to the answer use an IF-statement.
Here I changed your codes from "A1", "A2", ... to "1", "2",...
Code:
{if(Q1==1,'<img src="/upload/surveys/761949/images/Boot001_klein.jpg" />', 
if(Q1==2,'<img src="/upload/surveys/761949/images/Boot002_klein.jpg" />', 
if(Q1==3,'<img src="/upload/surveys/761949/images/Boot003_klein.jpg" />', 
if(Q1==4,'<img src="/upload/surveys/761949/images/Boot004_klein.jpg" />', 
if(Q1==5,'<img src="/upload/surveys/761949/images/Boot001_klein.jpg" /><img src="/upload/surveys/761949/images/Boot002_klein.jpg" /><img src="/upload/surveys/761949/images/Boot003_klein.jpg" /><img src="/upload/surveys/761949/images/Boot004_klein.jpg" />','')))))}

See the nested quotes (double quotes inside single quotes).







Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: surveySn
The topic has been locked.
  • surveySn
  • surveySn's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
3 years 3 months ago #210155 by surveySn
Replied by surveySn on topic Display the picture according to the answer
Think you joffm

Perfect!!!!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose