Skip to main content
Participant
March 13, 2019
Answered

Rounding Up

  • March 13, 2019
  • 1 reply
  • 2263 views

Hi.  I have a form where I want what is entered into the field to always round up to the nearest whole number.  I have the decimal place set to 0, but that rounds up or down depending on what's entered.

For example, if someone enters 19.2 into the field, I want it to automatically round to 20.

Please help!

This topic has been closed for replies.
Correct answer try67

As the custom calculation/validation script of the field enter this code:

if (event.value) event.value = Math.ceil(event.value);

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 13, 2019

As the custom calculation/validation script of the field enter this code:

if (event.value) event.value = Math.ceil(event.value);

Participant
March 13, 2019

Perfect!!! Thank you so much!!