How do you remove the space between the fixed text before the text box and the text box? | XM Community
Skip to main content
Solved

How do you remove the space between the fixed text before the text box and the text box?

  • January 31, 2020
  • 10 replies
  • 83 views

! I'm using Form as the text type in the response. I want to have a dollar sign to come before each text box, but the space between the dollar sign and the text box (indicated by the red box in the figure) does not go away. I tried "Add Default Choices" and pre-populated the dollar sign in the text box, but that's not how I want. I don't want the participants to be able to remove the dollar sign.

Best answer by rondev

> @SLEE said: > Thank you! the alignment however, didn't work... > ! > Hope you have pasted both the below lines jQuery("#"+this.questionId+" .ChoiceStructure table tr:eq(0) td:eq(0)").hide(); jQuery("#"+this.questionId+". ChoiceStructure table tr:eq(1) td:eq(0)").hide();

10 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • January 31, 2020
Put space in Form field and add below code in JS onReady `jQuery("<span>$<span>").insertBefore("#"+this.questionId+" .InputText");`

  • Author
  • January 31, 2020
Thanks for the response, but I'm not trying to get rid of the entire space before the text box. I still would like to put a dollar sign. How would I do that?

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • January 31, 2020
> @SLEE said: > Thanks for the response, but I'm not trying to get rid of the entire space before the text box. I still would like to put a dollar sign. How would I do that? If you want to have a little space before textbox then just change to this `<span>$ </span>`

  • Author
  • January 31, 2020
Thank you! I'm getting somewhere finally. Two more issues though: ! 1. How do I align the text boxes to the left? 2. the greater than or equal to sign shows up as ">=" How do I make this into a proper inequality sign that has > stacked on the top of =?

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • January 31, 2020
For 1. Add the below code to existing code: jQuery("#"+this.questionId+" .ChoiceStructure table tr:eq(0) td:eq(0)").hide(); jQuery("#"+this.questionId+". ChoiceStructure table tr:eq(1) td:eq(0)").hide(); For 2. Use `≥` `≤` for greater than or equal to and smaller than or equal to respectively.

  • Author
  • February 1, 2020
Thank you! the alignment however, didn't work... !

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • Answer
  • February 1, 2020
> @SLEE said: > Thank you! the alignment however, didn't work... > ! > Hope you have pasted both the below lines jQuery("#"+this.questionId+" .ChoiceStructure table tr:eq(0) td:eq(0)").hide(); jQuery("#"+this.questionId+". ChoiceStructure table tr:eq(1) td:eq(0)").hide();

  • Author
  • February 1, 2020
Yes. The following is what I have done. Again, thank you for your help! !

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • February 2, 2020
> @SLEE said: > Yes. The following is what I have done. Again, thank you for your help! In the last line there is no space before .ChoiceStructure Please add as seen on third line

  • Author
  • February 3, 2020
Thank you so much! It all works!