JavaScript - Changing alignment of text entry boxes within a side-by-side question | XM Community
Skip to main content

Hi,
I have a side-by-side question with a column of short text entry boxes. I've used the following code to add text after the boxes:-
for (var i = 0; i < inputs.length; i++) {
 var input = inputssi];
$(input).insert({after: listti]});
}
As a result my table now looks like this.
image.pngI've tried using this code to align the boxes to the left, so they'd all be straight.
jQuery("#"+this.questionId+" .ChoiceStructure").css("text-align","left");
I replaced this.questionId with the ID of the specific field, but no luck.
Does anyone have experience with this?

Try the below code:
for (var i = 0; i < inputs.length; i++) {
 var input = inputssi];
$(input).insert({after: listti]});
$(input).parent().css("text-align","left");

}
OR
Check this


Leave a Reply