Reversing scales only on computer v. mobile?? | XM Community
Skip to main content
Solved

Reversing scales only on computer v. mobile??

  • August 16, 2020
  • 7 replies
  • 572 views

On a computer I'd like my horizontal responses to a multiple choice question to go from Strongly Disagree to Strongly Agree, left to right. By default this means on mobile the responses will go Strongly Disagree to Strongly Agree, top to bottom. Is there a way for me to reverse the order only on mobile so that they read Strongly Agree to Strongly Disagree, top to bottom? Many thanks!

Best answer by TomG

https://www.qualtrics.com/community/discussion/comment/33648#Comment_33648Copy the script and paste it into the question's JavaScript. See: https://www.qualtrics.com/support/survey-platform/survey-module/question-options/add-javascript/

7 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • August 17, 2020

In the survey flow before the multi choice question, create the below embedded data and branch logic as shown below:
image.pngThen, in the multichoice question, add below javascript, under Onready function:
if("${e://Field/isMobile}"==1){

jQuery('table.ChoiceStructure tr').each(function() {
 var tds = jQuery(this).children('td').get().reverse();
 jQuery(this).append(tds);
});
}


Thank you for the response. I'll give it a try!


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • August 17, 2020

Actually, you don't need to set a variable in the survey flow. Just attach this script to the horizontal MC question:
https://gist.github.com/marketinview/85c2c5717354827fc9d6b7997b114710


  • January 23, 2021

TomG,
Could I trouble you to explain (to a simpleton) how exactly to attach this script. This problem is actually a huge deal for my work and I would LOVE to solve it. Thanks very much.


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • January 24, 2021

  • January 24, 2021

Dear TomG,
This is terrifically helpful. You have solved the problem.
As an aside, I am dumbfounded by this problem. From a psycho-physical point of view, horizontal scales are intuitively sensible (to English speakers) when they increase from left to right (say, "low confidence" anchored to the left end, and "high confidence" to the right). By the same token (and even more so), vertical scales are most intuitive when high values are anchored to the top, consistent with the "up is more" intuition. Thus, it would be counter-intuitive for users to have a scale with "low confidence" at the top and "high confidence" at the bottom. But that is exactly how the default for mobile platforms is set in Qualtrics. One can only wonder how much noisy and faulty data are being collected from mobile devices because of this issue. I hope that Qualtrics fixes this ASAP.
Either way, thanks very much for your help. Dan Simon


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • January 24, 2021

https://www.qualtrics.com/community/discussion/comment/33658#Comment_33658Dan,
Not all multiple choice questions are scales. For non-scalar questions it might not make sense to change the order.
Also, it is easy to understand from a technical point of view. In HTML, the choices are a table row with cells in left to right order. To make it vertical Qualtrics uses a @media CSS rule so when the screen width is 480px or less it changes the cells to display:block which makes them vertical but doesn't change the order.