[Solved] Qualtrics Word Counter Javascript [closed]
Add an element with an id of ‘wordCount’ to the question text(in html editing mode) like this. <div id=”wordCount” style=”text-align: center; font-size: 2em; font-weight: bold;”>0</div> Then in the question’s Javascript input the following: Qualtrics.SurveyEngine.addOnload(function() { $$(‘.InputText’)[0].observe(‘keypress’, keypressHandler); function keypressHandler (event){ var entry = $$(‘.InputText’)[0].value.split(” “); var count = entry.length – 1; $(‘wordCount’).update(count); } }); This … Read more