How do you enter fixed text after each text box in form type? | XM Community
Skip to main content
!

How do you add static text after each text box in the form text type? Also, how do you add inequality signs for "greater than or equal to" or "smaller than or equal to" in the same static text?
Use the below code



jQuery("<span>>=<span>").insertAfter("#"+this.questionId+" .InputText:eq(0)");

jQuery("<span><=<span>").insertAfter("#"+this.questionId+" .InputText:eq(1)");
Thank you again. Where am I supposed to add the fixed text in the code?
> @SLEE said:

> Thank you again. Where am I supposed to add the fixed text in the code?



Between the span tag `<span>HERE</span>`

I want to add the '%' sign after a free text box.
Last week I managed to add units after free text boxes using this script.
The same java script doesn't appear to be working when I tried to do it for a new question today. Can anyone assist?
Qualtrics.SurveyEngine.addOnload(function()
{
var inputs = $(this.getQuestionContainer()).select('input[type="text"]');
 
for (var i = 0; i < inputs.length; i++) {
 var input = inputsti];
 $(input).insert({after: ' %'});
}

});

Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/

});

Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/

});


Leave a Reply