Change width of question text in form type question | XM Community
Skip to main content
Question

Change width of question text in form type question

  • 9 September 2024
  • 3 replies
  • 49 views

Forum|alt.badge.img+1

Hello,

I want to know how to increase the width of the text next to the form entry text box so that the text does not span across so many lines

 

chackbusch
QPN Level 5 ●●●●●
Forum|alt.badge.img+21
  • QPN Level 5 ●●●●●
  • September 9, 2024

@suchisaha Try to add the JavaScript below to your question and decrease/increase the 60% if necessary. 

Qualtrics.SurveyEngine.addOnload(function()
{
let labels =document.getElementsByClassName("LabelWrapper")
for(let i=0;i < labels.length;i++) { labels[i].parentElement.style.width = "60%"
}
});


Forum|alt.badge.img+1

thanks . It worked. how will i make the text box size same as the text automatically rather than manually change the size of the text box entry size?


chackbusch
QPN Level 5 ●●●●●
Forum|alt.badge.img+21
  • QPN Level 5 ●●●●●
  • September 9, 2024

@suchisaha If you define the label with 50% width, the text box should automatically use the other 50%.


Leave a Reply