Matrix with two different scale points? | XM Community
Skip to main content

Matrix with two different scale points?

  • November 14, 2022
  • 6 replies
  • 156 views

Forum|alt.badge.img+1

matrix with multiple headers.JPGI created a matrix with repeating headers, but I would like the second header to have different scale points than the first. Is there a way to do that as pictured in my edited screenshot?

6 replies

Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • November 14, 2022

sarann
You can include something like this for all your header id's
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
var qid= this.questionId
document.getElementById('header~'+qid+'~1~1').querySelector('span').innerText="Least Feasible";

});


Hope it helps!


Forum|alt.badge.img+1
  • Author
  • November 14, 2022

Deepak
I pasted that into the item's JavaScript pop up box, but it didn't change the second header. Any thoughts for how I can troubleshoot?


Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • November 14, 2022

sarann
Yes that's because I wrote just for first, you had to copy paste it based on id's
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
var qid= this.questionId
document.getElementById('header~'+qid+'~1~1').querySelector('span').innerText="Least Feasible";
document.getElementById('header~'+qid+'~1~6').querySelector('span').innerText="More Feasible";
document.getElementById('header~'+qid+'~1~9').querySelector('span').innerText="Most Feasible";

});
Hope it helps!


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • November 14, 2022

sarann ,
You may want to consider using Profile format on your Matrix. You wouldn't need JS at all.


Forum|alt.badge.img+1
  • Author
  • November 15, 2022

TomG
Profile format almost gets me to what I want, but I'd love to have the boxes the same size. How do I adjust that?
profile matrix.JPG


Forum|alt.badge.img+2
  • Level 2 ●●
  • March 7, 2025

@TomG is there any way to put the statements in a Profile format on your Matrix question above the scale choices?