Put question text to the left of autocomplete text box | Experience Community
Skip to main content
Question

Put question text to the left of autocomplete text box

  • Apr 26, 2021 8:30 PM UTC
  • 4 replies
  • 83 views

I would like to put the question text to the left of the autocomplete text box (see picture below - I would like to move the "2." to the left on the same line). Is this possible to do with JS?

Screen Shot 2021-04-26 at 4.29.30 PM.png

4 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • Apr 26, 2021 10:34 PM UTC

Reduce the size of your text box. It'll fit automatically.
Or move to a form type question.


  • Author
  • Apr 27, 2021 3:38 PM UTC

Thanks ahmedA! Unfortunately resizing the text box doesn't move the question text and the form type question doesn't support autocomplete text boxes. Any other ideas on how to do this?
Really appreciate it!


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • Apr 27, 2021 4:27 PM UTC

Can you share the survey link?


faris
QPN Level 2 ●●
Forum|alt.badge.img+3
  • QPN Level 2 ●●
  • Apr 27, 2021 8:44 PM UTC

Hey Adamg
This CSS code worked for me. Note that it changes the formatting for all Text Entry Single-Line questions.
.Skin .TE .SL legend {
    float: left;
width: auto;
}


.Skin .TE .SL legend + div.QuestionBody {
padding: 20px
}

If you don't want to apply the formatting to all Text Entry Single-Line questions, you could use the following JS code to modify just that specific question:

Qualtrics.SurveyEngine.addOnReady(function()
{
    QID = this.questionId;
jQuery('#' + QID + ' legend').css('width','auto');
jQuery('#' + QID + ' legend').css('float','left');
jQuery('#' + QID + ' .QuestionBody').css('padding','20px');
});