How would I remove choice group answers indentation when displayed? | Experience Community
Skip to main content
Solved

How would I remove choice group answers indentation when displayed?

  • June 8, 2026
  • 4 replies
  • 16 views

Forum|alt.badge.img+1

I’d like to randomize answer choices by group through choice group but I noticed the cluster of answers assigned to the choice group are slightly indented/ not aligned vertically with the other answer options for the question. Is there a way to remove the indentation? Thank you for any help.

Best answer by vgayraud

Qualtrics.SurveyEngine.addOnReady(function () {
var groups = this.getQuestionContainer().querySelectorAll('.choice-group');
for (var i = 0; i < groups.length; i++) {
groups[i].style.setProperty('margin-left', '0', 'important');
}
});

 

4 replies

vgayraud
QPN Level 7 ●●●●●●●
Forum|alt.badge.img+65
  • QPN Level 7 ●●●●●●●
  • June 9, 2026

Hi,

Assuming you’re using NSTE and talking about a multiple choice question, you can try this:

Qualtrics.SurveyEngine.addOnReady(function () {
this.getQuestionContainer().querySelector('.choice-group').style.setProperty('margin-left', '0', 'important');
});

 


Forum|alt.badge.img+1
  • Author
  • June 9, 2026

Thanks! This worked. Can you share how I might update your JS if I have two choice groups? One of the choice groups did align with the other answers but the 2nd is indented. Thank you!


vgayraud
QPN Level 7 ●●●●●●●
Forum|alt.badge.img+65
  • QPN Level 7 ●●●●●●●
  • Answer
  • June 9, 2026
Qualtrics.SurveyEngine.addOnReady(function () {
var groups = this.getQuestionContainer().querySelectorAll('.choice-group');
for (var i = 0; i < groups.length; i++) {
groups[i].style.setProperty('margin-left', '0', 'important');
}
});

 


Forum|alt.badge.img+1
  • Author
  • June 9, 2026

Thank you; very helpful. It worked