Text entry box in a multiple choice question - is it possible to have it beside instead of below? | XM Community
Solved

Text entry box in a multiple choice question - is it possible to have it beside instead of below?

  • 18 March 2020
  • 4 replies
  • 62 views

Userlevel 1
I have a multi-choice question with the last option being "Other (please specify)" with a text box. This text box appears below the text. Is it possible to have it beside instead?
icon

Best answer by rondev 18 March 2020, 12:49

View original

4 replies

Userlevel 7
Badge +22
Try using below code in JS onReady

jQuery("#"+this.questionId+" .TextEntryBox").each(function() {
var tb = jQuery(this);
tb.css({"float":"none","background-color":"white","width":"50%"});
tb.prev("label").css("display","block").append(" ").append(tb);
});
Userlevel 1
This worked perfectly! Thank you so much @rondev !
Badge

This works super well when using a small text entry box, however not when I make a medium text entry box. I've tried increasing the QuestionBody height, but this also doesn't seem to work. Any ideas rondev?
Thanks!!

Badge +1

https://www.qualtrics.com/community/discussion/comment/23216#Comment_23216This code works perfectly on a normally displayed question. However, if I try to use it on a question that has in-page display logic (only gets shown if a specific answer in a previous question on the same page is chosen) it does not work.
More specifically: the background colour and width still works, but the "placing the TextEntryBox BEHIND, NOT BELOW the text does not work
Any idea why and how I can make it work? Thanks!!!

Leave a Reply