Embedding pictures that were selected in previous question into next question text | XM Community
Skip to main content

Hi there!

I am using a multiple choice question, in which each answer option is an image. Multiple images can be selected.

Now in the next question (which can either be in the same block, but I can also move it to a new block if needed), I would like to have a text entry question, and somehow display the pictures that a participant selected in the previous question. This can either be done in the text box of the text entry question, or I could also add an additional text/graphic question before that. Essentially I would like to say: You selected these pictures (show pictures). Can you please explain why?

I can not use carry over for a text entry question apparently. I tried to use embedded data for this (following this approach 

), adapted to my needs. My JS looks like this:

Qualtrics.SurveyEngine.addOnPageSubmit(function() {
    
var images = {"https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_C1garYIF9jpASax":"01",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?":"02",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_FHmhK4xdaRoYW1j":"03",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_ChkCkACiv1c4v6I":"04",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_sWIZOSnOYGy6jrJ":"05",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_96WZzCbaEmQjyxv":"06",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_y2uzCW1v0TgjZTA":"07",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_hUBXgTyLfchAaOR":"08",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_ofHJTvf0S7RTtOI":"09",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_G7hI2VYeI4ArAzM":"10",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_5KTE3QilpFqJYit":"11",
              "https://descil.eu.qualtrics.com/CP/Graphic.php?IM=IM_pWklxaixVxDNisN":"12"
             };
var selectedImagesAdults = jQuery("#"+this.questionId+" select option:selected").text();
Qualtrics.SurveyEngine.setEmbeddedData("ImageCodeAdults",imagesyselectedImagesAdults]);
    
});

 

Its basically not doing anything currently.

The images in the previous question are added through the src link individually to each answer option. The question essentially looks like this (but with 12 images):


I appreciate any help!

Thanks a lot!

Hi,

I might be oversimplifying this but can’t you just pipe in the selected answers in your question’s text?

Something like ${q://QIDXXX/ChoiceGroup/SelectedChoices}

 


I thought about that too but so far no luck, although I’m not sure if I’m doing it right too.

My questionID is Q150, so I tried to add ${q://QID150/ChoiceGroup/SelectedChoices} to the question text. So far it doesnt show anything, but I’m also wondering if the ChoiceGroup refers to a specific group or if that simply specifies that qualtrics creates a group based on the made choices, and then the choices in this group are called SelectedChoices?

 

Thank you for your amazingly quick help by the way!


I take everything back! It worked! I just got the questionID wrong, i thought by manually changing the ID, this would also be the new ID that I can reference too, but it is not. When going through the pipedText menu and selecting the right question it works! Thanks again!


Leave a Reply