word count progress bar.pdfI have a code (HTML and Javascript) that gives me a textarea and a progress bar that reacts to the number of words typed into the textarea. I had no struggle including the code before the Qualtrics update.
Now the problem is:
If the question type I use is a text/graphic, everything looks fine, but the answers participants give are not saved.
If the question type I use is a text entry, the answers participants give in the HTML textarea are not saved and there is another textarea from Qualtrics below my HTML texarea.
So I guess I need to connect my code to the existing textarea, but that does not work. How do I do it?
You can finde my code attached. Thank your for your help!
Solved
How do I connect my HTML code (word count progress bar) to the textarea in Qualtrics?
Best answer by ahmedA
Use a tex/graphic question. Add another text entry question below it.
Add this JS to the Qualtrics text entry question:
Qualtrics.SurveyEngine.addOnReady(function () {
this.questionContainer.hide();
let my_text = this.questionContainer.querySelector("textarea");
document.querySelector("#NextButton").onclick = function () {
my_text.value = document.querySelector("#progress").next("textarea").value;
};
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
