How would I create a button to go with this question? | XM Community
Skip to main content

For the next period, we would like you to complete a simple task. First, we would like you to picture a coat rack for a moment. Try to become very aware of your thoughts and the thoughts that enter you head. You can think about whatever comes to your mind but press or click the button below each time that a thought about coat racks goes through your mind.

Hi there, if you still need, I've used the below before to include a button counter that displays the click count back to the respondent. First create an Embedded Data Element at the top of the Survey Flow and create an Embedded Data field called "clicks". This field will update with the current click count each time the button is clicked.
Then using the Rich Content Editor's HTML/Source view "<>, update the Question Text with the below: 
For the next period, we would like you to complete a simple task. First, we would like you to picture a coat rack for a moment. Try to become very aware of your thoughts and the thoughts that enter you head. You can think about whatever comes to your mind but press or click the button below each time that a thought about coat racks goes through your mind.







Clicks: 0
Finally, add the below to the question's JavaScript in the Onload section.
var count=0

document.getElementById("button1").onclick=function(){
    count=count+1;
    document.getElementById("counter").innerHTML=count;
    Qualtrics.SurveyEngine.setEmbeddedData('clicks', count);
}
Also, you might want to add a Timing question to this that will auto-advance the page after a period of time.


Leave a Reply