Javascript for dynamic math operation for multiselect side-by-side question? | XM Community
Question

Javascript for dynamic math operation for multiselect side-by-side question?

  • 9 November 2023
  • 1 reply
  • 49 views

Badge

I am pretty much ignorant of working with javascript in Qualtrics, but I was informed that I should add javascript codes for features I’d like to include in my survey. I searched up the community and tried several options without using javascript, without any success. I’d greatly appreciate any help you could offer…!

 

Here’s what I want: to display calculated results based on respondents’ answers real-time below the question, and prevent respondents from proceeding to next page if the calculated results exceed certain preset numbers (see the screenshot).

I’d like the form fields to display the sums of numbers of boxes selected by respondents (weighted by # of XXX/YYY tokens). Can anyone help…? I’m also sharing the qsf file for this survey in case it helps… https://drive.google.com/file/d/1waCriZCNqK-DqHVodo-qqZnLon_fKl2U/view?usp=share_link 

Thanks in advance…!

 

 

 


1 reply

Userlevel 7
Badge +22

Yes we can use change event on checkbox and do the calculation using JS.

Leave a Reply