How to randomize images side by side, but always present text in the same order? | XM Community
Question

How to randomize images side by side, but always present text in the same order?

  • 21 March 2020
  • 2 replies
  • 12 views

Hi,

I am trying to conduct a survey, in which participants have to categorize images. Sometimes there will be 2 objects, and sometimes there will be 3. I am trying to randomly present the images side by side one another, but present text below each object in the same order each time, right to left (either J, K; or J K L - depending on whether there are 2 or 3). In other words, I need to randomize the images but keep the text order constant, all within a single question. Is there a way to do this? I have read some suggestions for loop & merge, but I am unsure how to use this to implement what I need.

Thank you!!

2 replies

Userlevel 7
Badge +22
You can have 3 embedded data which will be assigned random src of images using survey flow randomizer element/ or using JS(preferred). Use this embedded data pipe text in the src of image tag.
Thank you...I'm new to JS. What's the best way to shuffle the images using JS?

Leave a Reply