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

Display Sum Total of Slider Choices

  • Jan 19, 2019 10:03 PM UTC
  • 3 replies
  • 205 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.
View original

3 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • Jan 20, 2019 7:19 PM UTC
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
  • Jan 20, 2019 8:07 PM UTC
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 ●●●●●●●●
  • Jan 20, 2019 9:14 PM UTC
> @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).