Forums

Data field with numbers with no leading 0 allowed

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).
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
healyhatman 31 Jan, 2020
Answer
Set the input mask to integer
alexatr 31 Jan, 2020
Thx for your hint - the input mask is already set to integer but it allows leading 0 anyway.
healyhatman 31 Jan, 2020
1 Likes
No that's the field validation. There's an input mask option.
alexatr 31 Jan, 2020
thats the solution - many thanks
This topic is locked and no more replies can be posted.