Display Sum Total of Slider Choices | XM Community
Solved

Display Sum Total of Slider Choices

  • 19 January 2019
  • 3 replies
  • 60 views

I would like the total sum of slider choices be displayed on the same page as the sliders. RIght now, a total is displayed when you force the slider choices to sum to some value. But I do not want that validation.

How do you display the sum total of slider choices on the same page as the slider?
icon

Best answer by TomG 20 January 2019, 20:19

View original

3 replies

Userlevel 7
Badge +27
You'll need to write some JS to do this:
1. Append a total row to your question
2. Write a function to sum the rows and update the total
3. Execute the function above when the page loads
4. Add event handlers to execute the function above any time a row changes.
Hey TomG,

Thank you for this! I am a total newbie in JS. Is there a link to tutorials/resources to implement what you've described?
Userlevel 7
Badge +27
> @1ag0 said:
> Hey TomG,
>
> Thank you for this! I am a total newbie in JS. Is there a link to tutorials/resources to implement what you've described?

There are tutorials on JavaScript and jQuery at https://www.w3schools.com/, but learning it is something that takes time (i.e., considerably more than a few hours).

Leave a Reply