Adding symbols/characters after/before Text Entry in Multiple Choice type question | XM Community
Skip to main content

Adding symbols/characters after/before Text Entry in Multiple Choice type question


Forum|alt.badge.img+2

Just want to insert the "%" sign after the text box. I have already a sample code I used on other question type. But this one is not working . See attached file
Here's my code
jQuery("#"+this.questionId+" .TextEntryBox .InputText").css("width","96%").after(" %");
Here's the code in the inspect element:
image.png
From this
image.pngTo this
image.png


8 replies

Shashi
Level 8 ●●●●●●●●
Forum|alt.badge.img+31
  • Level 8 ●●●●●●●●
  • 633 replies
  • October 4, 2022

Use the below code:
jQuery("#"+this.questionId+" .TextEntryBox.InputText").css("width","96%").after("%");


Forum|alt.badge.img+2

https://community.qualtrics.com/XMcommunity/discussion/comment/50346#Comment_50346Your code is same as mine above. This code wont work. Thank you for your response.


Shashi
Level 8 ●●●●●●●●
Forum|alt.badge.img+31
  • Level 8 ●●●●●●●●
  • 633 replies
  • October 4, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/50348#Comment_50348There should be no space between .TextEntryBox and .InputText


Forum|alt.badge.img+2

Forum|alt.badge.img+2

https://community.qualtrics.com/XMcommunity/discussion/comment/50346#Comment_50346how about for this html code. Which selector will I be using?
image.png


Shashi
Level 8 ●●●●●●●●
Forum|alt.badge.img+31
  • Level 8 ●●●●●●●●
  • 633 replies
  • October 4, 2022

https://community.qualtrics.com/XMcommunity/discussion/comment/50355#Comment_50355jQuery("#"+this.questionId+" .InputText").css("width","96%").after("%");
Try the above.


SuhasM
Qualtrics Employee
Forum|alt.badge.img+16
  • Qualtrics Employee
  • 114 replies
  • October 4, 2022

Thank you so much Shashi for continuously helping out the community and providing a working solution! 🙂


Forum|alt.badge.img+3

@Shashi Is there a way to modify this code so the text is before the text entry box? I tried changing “after” to “before” but the text was still after the text box. 

Thank you!