Display Sum Total of Slider Choices | XM Community
Skip to main content
Solved

Display Sum Total of Slider Choices

  • January 19, 2019
  • 3 replies
  • 167 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?

Best answer by TomG

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.

3 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • January 20, 2019
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.

  • Author
  • January 20, 2019
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?

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • January 20, 2019
> @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).