How to change the size of multiple text boxes in Side by Side questions? | XM Community
Skip to main content
Solved

How to change the size of multiple text boxes in Side by Side questions?

  • March 24, 2021
  • 1 reply
  • 268 views

I am asking respondents to insert the month and year they were born in a side by side question as I prefer this layout. However, I want to choose the size of the text boxes beyond 'small, medium, large', I have found some javascript to change the size of both boxes:
jQuery("#"+this.questionId+" input[type='text']").css("width","3.5em")
});
Which looks like the below:
image.pngHowever, I want to know how to amend the the script so that they are different sizes.
Thanks!

Best answer by ahmedA

jQuery("#"+this.questionId+" input[type='text']").eq(0).css("width","3.5em")
jQuery("#"+this.questionId+" input[type='text']").eq(1).css("width","10em")

1 reply

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • Answer
  • March 24, 2021

jQuery("#"+this.questionId+" input[type='text']").eq(0).css("width","3.5em")
jQuery("#"+this.questionId+" input[type='text']").eq(1).css("width","10em")