Hi all,
I have a text entry question and want to count the number of characters the response has and record this numeric value as an embedded data. This should not be visible for the respondents. I want to use the embedded data later on to trigger actions. Does anybody knows how to do it and what the java logic would be?
Thanks
Page 1 / 1
Qualtrics.SurveyEngine.addOnReady(function () {
let text_entered = this.questionContainer.querySelector(".InputText");
text_entered.oninput = function () {
Qualtrics.SurveyEngine.setEmbeddedData("text_length", text_entered.value.length);
};
});
Thanks Ahmed!
So, i should paste this code in the text entry question and text_lenght would be the embedded data, right?
In the javascript of a text entry question.
Thanks ahmedA,
It works perfect! you are a guru!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.