Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen

Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

0 votes

Good afternoon,

I have a question regarding using an answer (in the form of an image) in a later question. I will explain my situation first:
On page 2 I have a question in my survey that asks the participant to choose from 4 images (4 answer options). On page 3 I want to show the image that they picked (on page 2) next to some text. Then, the survey continues to another question.

I found a manual to use an answer (text) in a later question, but not if the answer is an image.

I hope I explained it clearly!

Looking forward to your response.

Many thanks

in SoSci Survey (English) by s199766 (110 points)

1 Answer

0 votes

You can use a placeholder to set the appropriate image, depending on the response:

$code = value('AB01');
$images = [
  1 => 'myFirstImage.jpg',
  2 => 'mySecondImage.jpg',
  3 => 'myThisImage.jpg',
  4 => 'myFourthImage.jpg'
if ($code > 0) {
  replace('%image%', $images[$code]);
  html('<div style="text-align: center"><img src="%image%" alt=""></div>');

Something like this...

by SoSci Survey (223k points)