displaying images using loop and merge | XM Community
Question

displaying images using loop and merge

  • 24 July 2023
  • 9 replies
  • 162 views

Userlevel 2
Badge +2
  • Level 2 ●●
  • 4 replies

I want to display a series of images with a slider question using the loop and merge function. I have loaded the image urls in field 1 but I am unsure what the html should be to get the images to show. I have tried this - ${lm://Field/1$} - but it is not working. thanks in advance for any help


9 replies

Userlevel 6
Badge +18

Hi @ar03,

Nice to e-meet you!

Well you are almost their with the setup, as a final step: add the below code in the “HTML View” of your questions:-
 

<img style="width: 100px; height: 300px;" src="${lm://Field/1}">

 

Note: Feel free to adjust the width and height as per our requirement.

Userlevel 2
Badge +2

hi Saurabh, many thanks for your reply. I have entered the code you suggest but when I preview the block the images are still not loading. Maybe I have entered the images incorrectly in loop and merge?

 

Userlevel 6
Badge +18

Hi @ar03,

Could you please also share the screenshot of the HTML view?

Additionally, I would recommend to remove blank rows from the column, as their is high possibility that the blank rows may also get picked in the loop and show nothing in result.

Userlevel 2
Badge +2

Thanks, yes, here you go:

 

Userlevel 6
Badge +18

Thanks, yes, here you go:

 

The code looks correct. Have you tried removing the blank entries and then taking the link again?

Userlevel 2
Badge +2

yes, unfortunately it is still not working - I just get the slider without the image when I preview the block 

 

Badge

Yes, I meet the same situation. Everything I have set, but it does not work!!
 

 

Badge

Hi, I ran into similar issue: the links are properly set in the loop and merge but then the images are just not showing. Was anyone able to fix it? Any help will be appreciated!

 

Is it possible that it’s because I’m working on a collaborative project and another person uploaded the pictures to Qualtrics? I doubt it because I’m using html links that properly display the image when paste in the browser. 

 

 

Badge

For anyone looking into this issue in the future: in my case the pictuers were actually propely displaying when viewed in actual survey (incognito mode of the browser). For some reason, it just wasn’t working in preview mode. Hope it helps someone! :) 

Leave a Reply