Mask the entry times in seconds and tenths and hundreth-of-seconds with CalderaForms

0  comments

See the other blog posting on the other site, Code.CLOH.org, for more insights.

For the benefit of fellow coders, and my fleeting memory:

The embed fits between the red lines below. Have to go to option "I" to find the success.


Aim is to get the masking to work so a time can be entered into the field without an error.

Time could be two digits for seconds and perhaps up to 2 digits for tenths and hundreths of seconds after a period.

Calculations need to work too.

Set up as single line text field with :99.99.

But should not allow, :79.99

Number such as 13.04 does not work

Total:


Must be 4 digits to do the math

Total:


Mask set at **.** Foil if char. Fails if not 4 digits.

Total:


Plus show up in field. Fail always.

Total:

[9|*] Fails as allows only 1 digit

Total:


[99.99|*] Fails, only 1 digit.

No pipe char. Brackets in. [99.99*]

Total:


Brackets out 99.99*

Total:


Bingo! This works, finally.

Can not put in 1-minute and 3 seconds and 10 tenths, such as 1:03.10. That number does not add. But, can put in 14, 14.1, 14.11 or even 14.11111111. The end result in the adding is money format, so it will keep to just 2 decimal places.

Do NOT make the field a HTML type as NUMBER as the decimal places cause a FAIL. [{9*}] but as type NUMBER, FAIL with 14.2 due to decimals.

[{9*}] as single line text and type text

Total:


[{9*}] but as type NUMBER, FAIL with 14.2 due to decimals.

Total:


About the author 

Mark Rauterkus

Swim, water polo and SKWIM coach in Pittsburgh, PA, USA. Also the webmaster for the International Swim Coaches Association.

You may also like

Triathlete set, 10 x 100s

Test set article from Swimming World

North Texas Relay Challenge

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Subscribe to our newsletter now!

>