When a user responds to a multiple choice question (one question per page), I want to record their first response and a second one if they change their mind. I know the timing question records time until a first click is made and the time for the last last click on a page, but I want to know WHAT was clicked on. This ability will be useful to educators teaching with Qualtrics.
Page 1 / 1
@Prof This would require the use of JavaScript. There is no built in way to achieve this functionality.
Yes, thank you. I figured that after searching the help files. I was hoping someone had already done what I needed and could provide the JavaScript. Qualtrics could be a powerful education tool with this ability--to track students as they approximate a correct answer.
@Prof Ahh, just realized this was in "Custom Code" I may have a chance to work something out sometime soon. I'll get back with you if I find some time!
Wow, that would be great. A record of the initial response, a second response and maybe a final response as embedded data would be would be ideal.
I have tried some JS but must be doing something wrong, hopefully simple or stupid so one of you can offer some help. I created an embedded variable called "resp" in the SurveyFlow. Then for the question where I want to record what the sequence of choices they clicked on, I put in the following script from the API just to verify that a choice value has been passed to the embedded data:
var response = this.getChoiceRecodeValue;
The editor closed, so no obvious syntax errors. The embedded variable value never changes no matter what choice is clicked because I haven't yet connected response to resp. So I found some JS code which seemed to set the value, but, adding it, blows up the editor.
Qualtrics.SurveyEngine.setEmbeddedData(“resp”,response);
So how do I get the embedded variable value set to the choice values?
Once I have that fixed, I just want to concatenate the choices. So if the person clicks on the 1st, 3rd, and 6th choice, I want resp to = 136. So I thought I would replace the first line above with:
var response = response + this.getChoiceRecodeValue;
But is response a number or text? Do I have to put anything in quotes to make it text--I don't want resp/response to = 10 in my example?
var response = this.getChoiceRecodeValue;
The editor closed, so no obvious syntax errors. The embedded variable value never changes no matter what choice is clicked because I haven't yet connected response to resp. So I found some JS code which seemed to set the value, but, adding it, blows up the editor.
Qualtrics.SurveyEngine.setEmbeddedData(“resp”,response);
So how do I get the embedded variable value set to the choice values?
Once I have that fixed, I just want to concatenate the choices. So if the person clicks on the 1st, 3rd, and 6th choice, I want resp to = 136. So I thought I would replace the first line above with:
var response = response + this.getChoiceRecodeValue;
But is response a number or text? Do I have to put anything in quotes to make it text--I don't want resp/response to = 10 in my example?
Please disregard my previous comment and this whole thread. It turns out Qualtrics cannot do what I want to do because it does not record a click value on a page until the next page is loaded. Thus, it only records the last click, which can be the same as the first click if you don't use the "in page" option in display logic. But I wanted the display in page option to provide feedback while the user can see all the options he/she didn't click on. I have now developed a work around. My apologies for cluttering up this forum.
I think I found a way of doing what you are looking for, but I did it by mistake trying to solve my own problem. Check out my discussion, I shared the code I am currently using (and which is not doing what I want, but what I understand you want!!)
qualtrics.com/community/discussion/2529/matrix-profile-question-count-number-of-selected-cells-per-column#latest
qualtrics.com/community/discussion/2529/matrix-profile-question-count-number-of-selected-cells-per-column#latest
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.