Welcome to the LimeSurvey Community Forum

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

Show image from previous answer in a new question

  • esthetiquevert
  • esthetiquevert's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #205894 by esthetiquevert
I am trying to add an image into a new question that have been selected as an answer in the previous question.

To do that I tried without success: {Q001.shown} - this one just shows the pathway, but not exactly the image

I also thought about trying the function if, but that did not work as well

{if(Q001=="A1",< img src="/upload/surveys/surveyID/images/image_name.jpg" >," ")}

Does anyone know what I should do?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #205895 by Joffm
Hi,
it is nearly correct.
You forgot the quotes

{if(Q001=='A1','< img src="/upload/surveys/surveyID/images/image_name.jpg" >','')}

And remember: No nested quotes. You see the double quotes inside the single quotes.
Of course you have to extend the function if there are other options selected in Q001.

On the other hand you could create as many questions as there are images, display with plain "<img src=.../>" and display the questions by relevance equation.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose