I have a form with multiple fields. I have a field that I need to find the max and min of the numbers entered and subtract the min from the max.
Basically, the user will input data into the form:
- field1 = 5
- field2 = 4
- field3 = 2
- field4 = 1
field5 = 3
fieldcalc = (max(field1, field2, field3, field4, field5)) - (min(field1, field2, field3, field4, field5))
should return 4
How do I implement this?