JS to insert space and text in Form Field | XM Community
Skip to main content

Hello,

 

I am trying to edit a form field that has 3 fields.  The first two are lbs and oz, while the third is grams

I know how to get the lbs and oz after the first two fields, but I would like to have some space then “OR” some space, and then the grams field.

 

Thanks in advance.

 

Paul

Try this:

Qualtrics.SurveyEngine.addOnload(function() {
jQuery(this.questionContainer).find("tr:last td").css("padding-top","20px");
});

 


Try this:

Qualtrics.SurveyEngine.addOnload(function() {
jQuery(this.questionContainer).find("tr:last td").css("padding-top","20px");
});

 

@TomG This works great. How would I insert OR between the 2nd and 3rd fields?

 


@TomG This works great. How would I insert OR between the 2nd and 3rd fields?

 

Qualtrics.SurveyEngine.addOnload(function() {
jQuery(this.questionContainer).find("tr:last").before("<tr colspan='2'><td>OR</td></tr>");
});

 


Leave a Reply