Showing numbers on drag-and-drop rank order question answers BEFORE dragging | XM Community
Skip to main content

Hiya!
I'm trying to get a rank order drag-and-drop question to display the default ranking numbers on the answers before a respondent starts dragging them. I haven't found any settings or custom code for doing that yet. Help?
Here's the question before it's been interacted with:
image.pngAnd here it is after any drag-and-drop interaction:
image.pngI want the blue numbers showing when the question is first presented. Thank you!

Qualtrics.SurveyEngine.addOnReady(function () {
    this.questionContainer
        .querySelectorAll("span.rank")
        .forEach((item) => (item.style.visibility = "visible"));
});


Perfect solution! Thank you so much for sharing this code, ahmedA !


Leave a Reply