Adding a Calculator to Survey | XM Community
Skip to main content
Solved

Adding a Calculator to Survey


Forum|alt.badge.img

Hi, I am trying to add a calculator in to be displayed near a question for the respondent to do their own math and input an answer but I have very limited coding experience. How would I do this?

Best answer by Tom_1842

Hi there, I found a bunch of JavaScript calculator implementations on codepen:
https://codepen.io/tag/calculator
Each implementation has HTML, CSS, and JavaScript that you can put in place in Qualtrics. I liked this one (credit vaishak101) and have adapted it into a Qualtrics survey. If you import the attached QSF file into a blank survey project, you should be all set.
SurveyCalculator.qsfSurveyCalculator1.png

View original

7 replies

Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • 876 replies
  • Answer
  • July 18, 2022

Hi there, I found a bunch of JavaScript calculator implementations on codepen:
https://codepen.io/tag/calculator
Each implementation has HTML, CSS, and JavaScript that you can put in place in Qualtrics. I liked this one (credit vaishak101) and have adapted it into a Qualtrics survey. If you import the attached QSF file into a blank survey project, you should be all set.
SurveyCalculator.qsfSurveyCalculator1.png


Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • 876 replies
  • July 18, 2022

Forum|alt.badge.img
  • Author
  • 2 replies
  • July 19, 2022

Thank you so much!


Forum|alt.badge.img
  • 2 replies
  • May 10, 2024

Hi, I have the same query but haven’t been able to access the attached file that you reference (the .qsf seems to just feed me back to this thread). Apologies if I’m missing something but could you please reupload this if you still have access? Thanks!


Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • 876 replies
  • May 10, 2024

@Raf here you go. I added the keith-wood calculator from the other thread in there too.


Forum|alt.badge.img
  • 2 replies
  • May 10, 2024

Thank you very much for the attachment and the swift response! This is exactly what I needed


Forum|alt.badge.img

If you need a specialty calculator or converter (think converting KG to LBS for example) I have a video that shows how to do that in Qualtrics with JavaScript.  For a regular calculator like you might find on your iPhone though, the one provided is perfect.  If you want a pop-up link though for people to calculate specific values (as in you want to provide the formula for them), you may find this helpful.  Code provided in the link as well. 

 

Video: