How can I have two side by side text boxes for one question with texts in between, e.g., (_____ out of ____ )? Thanks in advance!
Best answer by ahmedA
View originalHow can I have two side by side text boxes for one question with texts in between, e.g., (_____ out of ____ )? Thanks in advance!
Best answer by ahmedA
View originalThis 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);
});
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.