Make Two Columns in a Rank Order Text Box Question | Experience Community
Skip to main content

Make Two Columns in a Rank Order Text Box Question

  • Dec 15, 2022 6:13 PM UTC
  • 5 replies
  • 305 views

jflowers1
Level 4 ●●●●
Forum|alt.badge.img+35

I have a Rank Order question that is in the text box format (see example below). Is there a way to make the items and their accompanying text boxes appear in two columns instead of one?
image.png

5 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Dec 15, 2022 7:57 PM UTC

Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" .ChoiceStructure").css({"display":"grid","grid-template-columns":"repeat(2, 1fr)"});
});


jflowers1
Level 4 ●●●●
Forum|alt.badge.img+35
  • Author
  • Level 4 ●●●●
  • Dec 15, 2022 8:28 PM UTC

Thank you TomG , that worked perfectly!
Is there a way I can either add more space between the two columns or increase the padding on the right side of the list items? I tried to do it myself but didn't have any luck:
Qualtrics.SurveyEngine.addOnload(function() {
 jQuery("#"+this.questionId+" .li").css({"padding-right":"10px"});
})


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Dec 15, 2022 8:55 PM UTC

https://community.qualtrics.com/XMcommunity/discussion/comment/53272#Comment_53272Use css grid properties. For example, the space between columns can be set using column-gap.


Forum|alt.badge.img
  • Sep 30, 2024 9:27 PM UTC

@TomG Hi! Do you know if something changed with Qualtrics to make your code above not work anymore? I can’t get it to work, and I’m not sure if I need to update something within the snippet or if it’s just something else going on. 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Sep 30, 2024 9:33 PM UTC

@TomG Hi! Do you know if something changed with Qualtrics to make your code above not work anymore? I can’t get it to work, and I’m not sure if I need to update something within the snippet or if it’s just something else going on. 

It won’t work with Simple layout. I’m not aware of any changes.