How can I have two side by side text boxes for one question with texts in between, e.g., (_____ out of ____ )? Thanks in advance!
Page 1 / 1
This isn't possible using the default Qualtrics settings. However, you can use elements in the question in HTML and then store their value using embedded data. This is the demo for the code below:
Question HTML:
Please enter your value
Out of
Question JS:
Qualtrics.SurveyEngine.addOnPageSubmit(function(){
var my_val = this.getQuestionContainer().querySelector("#my_val").value;
var max_val = this.getQuestionContainer().querySelector("#max_val").value;
Qualtrics.SurveyEngine.setEmbeddedData("my_val", my_val);
Qualtrics.SurveyEngine.setEmbeddedData("max_val", max_val);
});
Thank you ahmedA ! Your solution perfectly solved this problem!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.