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

How to change text entry box width

  • July 5, 2022
  • 3 replies
  • 2409 views

Forum|alt.badge.img+4

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("[id='" +QIDOtherLabel+"']").append(jQuery("#" + QID).find(".TextEntryBox"));
jQuery("[id='" +QIDOtherLabel+"']").css("padding-top","30px");
jQuery("[id='" +QIDOtherLabel+"']").css("padding-bottom","30px");
jQuery("#" + QID).find(".TextEntryBox").css("float","none");

Any ideas?
Thanks!

Best answer by MatthewM

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

3 replies

MatthewM
Level 6 ●●●●●●
Forum|alt.badge.img+30
  • Level 6 ●●●●●●
  • 1084 replies
  • Answer
  • July 6, 2022

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


Forum|alt.badge.img+4

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!


MatthewM
Level 6 ●●●●●●
Forum|alt.badge.img+30
  • Level 6 ●●●●●●
  • 1084 replies
  • July 7, 2022

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.