Form field of percentages adding to 100% | Community
Skip to main content
Oliver_Zosel
Level 3
September 14, 2018
Solved

Form field of percentages adding to 100%

  • September 14, 2018
  • 1 reply
  • 4067 views

Looked around on the forum for this but wasn't able to find anything - does anyone have experience or recommendations for building a form that can ask how spend or time is distributed across 4-5 values and validate that those percentages add to 100%? Is this something better suited for a survey integration or custom Java JS (ty Sanford!)?

Message was edited by: Oliver Zosel

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Is this something better suited for a survey integration or custom Java?

JavaScript, not Java.

But yes, you can build this with JS . There's no built-in widget for it, but if you put a few <input type="range"> sliders on the form you can tie them together.  Really does require a spec for the look-and-feel, though. Checking percentages (math-wise) is the easy part.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
September 14, 2018

Is this something better suited for a survey integration or custom Java?

JavaScript, not Java.

But yes, you can build this with JS . There's no built-in widget for it, but if you put a few <input type="range"> sliders on the form you can tie them together.  Really does require a spec for the look-and-feel, though. Checking percentages (math-wise) is the easy part.

Oliver_Zosel
Level 3
September 14, 2018

Thanks Sanford, guess I'll start building that way.