Add text before / after a textbox | XM Community
Skip to main content
I've used the following Javascript to add custom text before or after a input textbox in an answer so far:



Qualtrics.SurveyEngine.addOnload(function()

{

var inputs = $(this.getQuestionContainer()).select('input[type="text"]');



for (var i = 0; i < inputs.length; i++) {

var input = inputs[i];



$(input).insert({before: 'text'});

$(input).insert({after: 'text'});

}



});



Now it seems that is not longer working :-(

Has anybody an idea how it could be working now?

I'm not really a Javascript-crack...
There is a good example out here in the Princeton stack of stuff around javascript in Qualtrics. It has some nice examples, and the first one deals with adding text to open end question types.



https://psrc.princeton.edu/sites/psrc/files/html_tips_tricks.pdf

Leave a Reply