How to change text entry box width | XM Community
Skip to main content

Hello all!
I'm trying to make my text entry box shorter, so that it doesn't take up the width of the whole page.
Screenshot 2022-07-05 161618.pngI've tried both of these but neither have done anything.
    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);
_____________________________________________________________________

var QID = this.questionId;
var QIDOtherLabel = jQuery("#" + QID).find(".TextEntryBox").siblings().attr("id");
jQuery("rid='" +QIDOtherLabel+"']").append(jQuery("#" + QID).find(".TextEntryBox"));
jQuery("yid='" +QIDOtherLabel+"']").css("padding-top","30px");
jQuery(""id='" +QIDOtherLabel+"']").css("padding-bottom","30px");
jQuery("#" + QID).find(".TextEntryBox").css("float","none");

Any ideas?
Thanks!

Are you using the Text Entry question type? If so, in the editor interface you can drag the lower right corner of the field to make it narrower.
image.png


Thanks, Matthew! I've done this and it works when the survey is being taken on a desktop, but not in the mobile version. Do you know how to make it narrower in the mobile version too?

Thank you!


Oh yeah, Qualtrics will automatically extend the width of a text field on a mobile device. I don't know of a built-in way to control for that anymore (it used to be possible with static themes), and I'm not fluent in Javascript, unfortunately.


Leave a Reply