How to add text after text box on mobile | XM Community
Solved

How to add text after text box on mobile

  • 22 October 2018
  • 3 replies
  • 71 views

I want to have a question where respondents give their answer in thousands of dollars. To format this question, I'm following the advice given in the following discussion on how to add static text before and after a text entry box:
https://www.qualtrics.com/community/discussion/102/how-to-add-static-text-after-a-text-entry-box

In my case this involves adding a dollar sign before and three zeros after. This works fine on desktop, however on mobile the static text refuses to display on the same line as the text box (as seen below). As far as I can tell, this is because the width of the text box is automatically set to 100%. Even if I set the width myself with javascript and it works properly on desktop , the width is automatically set to 100% on mobile. Any suggestions on how to resolve this will be greatly appreciated!

!
icon

Best answer by PeeyushBansal 22 October 2018, 08:32

View original

3 replies

Userlevel 7
Badge +33
Read on below post for mobile alignment

https://www.qualtrics.com/community/discussion/2084/percent-sign-after-text-fill
Hello @nate99 ,

Use the following code:

jQuery(".InputText").css("max-width","80%").after(",000").before("$");
Perfect, both answers worked great. Thanks so much for your help!

Leave a Reply