Change width of text entry box in a Multiple chocie answer with text entry | XM Community
Skip to main content

Hi all,
I'm using the below Javascript code to move the text entry box to the right of the answer box, but I also want to change the width. Changing the width in % or px in the code doesn't seem to change the actual width of the entry boxes. Also, if I choose the larger entry box options for the type of text entry boxes, the whole thing breaks down and the box is put underneath.
Qualtrics.SurveyEngine.addOnReady(function()
{
    jQuery("#"+this.questionId+" .TextEntryBox").each(function() {
      var tb = jQuery(this);
      tb.css({"float":"none","background-color":"white","width":"100px"});
      tb.prev("label").css("display","block").append(" ").append(tb);
  });

});
This produces:
example.pngBut I want the entry box to be about 3-4 times wider.

Any help would be appreciated. Thanks!

Ok, problem is likely solved. It turned out we had an override setting (!important) in our css somewhere, and the trick was to override this again with a question specific setting.


Hi JeffD
I realise you posted this a while ago but could you let me know how to make the width of multiple choice txt boxes wider please?
I don't want the text box beside the question but would like to make it wider. Thank you


Hi PAZ,
You can use the javascript I posted above to edit the width of boxes on individual items. You can also edit the style headers. Sorry I can't be more specific than that, it's been a while since I've worked on this problem.


Leave a Reply