Add text before / after a textbox | XM Community
Solved

Add text before / after a textbox

  • 22 May 2018
  • 1 reply
  • 367 views

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...
icon

Best answer by Rich_Boits_Walker 22 May 2018, 21:04

View original

1 reply

Userlevel 5
Badge +7
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