How would I count the amount of times participants pressed a button? | XM Community
Solved

How would I count the amount of times participants pressed a button?

  • 13 April 2020
  • 6 replies
  • 124 views

how to get the equivalent of "button counts," perhaps by having people press the button each time a target thoughts goes through their mind for a limited period (e.g., 3 minutes)

icon

Best answer by TomG 13 April 2020, 23:17

View original

6 replies

Userlevel 7
Badge +27

Are you referring to a keyboard button or an html button? Either way, you do it with a JS event listener, but they are two different events.

html button
I don't know how to code.

Userlevel 7
Badge +27

Use a click event. For example:
var count = 0;
jQuery("#myButton").click(function() {
count++;
Qualtrics.SurveyEngine.setEmbeddedData("count", count);
}); 

Actually, I haven't figured out how to make the button, yet, so I don't know if it's html or not.

Userlevel 7
Badge +22

You can create a button using HTML view of question :

See "How would I create a button to go with this question?"

Leave a Reply