Can I make multiple choice text boxes wider? | XM Community
Skip to main content
Solved

Can I make multiple choice text boxes wider?

  • February 6, 2022
  • 2 replies
  • 589 views

Forum|alt.badge.img+4
  • Level 1 ●
  • 14 replies

In my survey I have a number of multiple choice questions with an 'other' option. I need to make these text boxes wider to allow for more input. I only want it wider and not longer please.
Thank you
I found this on the web but it doesn't help. I'm assuming it applies to regular text boxes, and not multiple choice text boxes. (Please excuse my ignorance - I am a newbie++)
Qualtrics.SurveyEngine.addOnload(function()
{
function makeBigger(){ 
var txt = document.getelementbyid('txtbox');
txt.style['width'] = '300px';
 }

});

Best answer by TomG

PAZ ,
The code you posted specifically looks for an element with the id txtbox. That doesn't match any element Qualtrics uses. Not that it matters because it wouldn't have worked, but you never called the makeBigger function either.
You could do this:
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" .InputText").css("width","100%");
});

View original

2 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5926 replies
  • Answer
  • February 6, 2022

PAZ ,
The code you posted specifically looks for an element with the id txtbox. That doesn't match any element Qualtrics uses. Not that it matters because it wouldn't have worked, but you never called the makeBigger function either.
You could do this:
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" .InputText").css("width","100%");
});


Forum|alt.badge.img+4
  • Author
  • Level 1 ●
  • 14 replies
  • February 16, 2022

Thank you TomG.
This works beautifully.


Leave a Reply