Presenting a pair of two videos in loop & merge based on hidden question displayed choices

jkosie Community Member Qubie ✭
edited July 8 in Custom Code

I have a number of pairs of videos that I would like to present to participants to rate. There are 66 total pairs, and I would like each participant to view 20 pairs at random.

I'm currently using the loop & merge function along with a hidden question. In the hidden question, I have all possible video names listed as options. I set up the randomization such that only 20 options are displayed. Then, in my loop & merge question, I choose which videos to present based on which video names are displayed in the hidden question.

This works well for presenting one video, but I'm not sure how to present the second video in the pair.

Is there a way to edit the loop & merge function (or suggested javascript to use) so that both videos from each of 20 pairs is chosen and presented to participants in random order?

I've searched around online for an answer, but I haven't had luck finding anything. Thanks in advance!


  • ahmedA
    ahmedA IndiaCommunity Member, XMPN Member Wizard ✭✭✭✭✭

    You can set up a second field in loop and merge to hold the pair.

    Furthermore, you don't need the hidden question, scroll down and you'll see that you can randomize and present a subset.

  • jkosie
    jkosie Community Member Qubie ✭

    Thanks, Ahmed. I don't want the pair to be presented together, though. I'd like to loop randomly through the pair. Because they're vidoes, I'm using the following html to present them to participants. I'm not sure where to indicate that both field should be presented:

    <audio class="qmedia" controls="true" height="40" preload="auto" width="320"><source src="${lm://Field/3}" type="audio/wav" /><embed class="qmedia" flashvars="file=${lm://Field/3}&amp;

    width=320&amp;height=20&amp;type=mp3&amp;autostart=false" height="20" pluginspage="" src="../WRQualtricsShared/Flash/flvplayer.swf" type="application/x-shockwave-flash" width="320" wmode="transparent"></embed></audio>