Add text before / after a textbox | XM Community
Skip to main content
Answer

Add text before / after a textbox

  • May 22, 2018
  • 1 reply
  • 950 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...

Best answer by Rich_Boits_Walker

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

1 reply

Rich_Boits_Walker
QPN Level 3 ●●●
Forum|alt.badge.img+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