Data field with numbers with no leading 0 allowed

prevent leading zeros in a numeric form field.

Overview

The field validation setting allows leading zeros even when set to integer or decimal.
Use the input mask option instead of field validation to restrict entries to numbers without leading zeros.

Answered
ChronoForms v6
al alexatr 31 Jan, 2020
I need a field that contains only numbers - i can set the options to integer or decimal - in both cases you can enter a number with leading 0 (only 13 should be allowed and not 013).
Gr GreyHead 31 Jan, 2020
Hi Alexatr,

You could add a custom validation; or a JavaScript snippet to trim the value; or use PHP to trim it after the form is submitted.

Bob
al alexatr 31 Jan, 2020
Data field with numbers with no leading 0 allowed image 1Thx for your hint - the input mask is already set to integer but it allows leading 0 anyway.
he healyhatman 31 Jan, 2020
1 Likes
No that's the field validation. There's an input mask option.
al alexatr 31 Jan, 2020
thats the solution - many thanks
This topic is locked and no more replies can be posted.