Buy Now
Sign in

Data field with numbers with no leading 0 allowed

alexatr , January 31 2020, 07:47
A
alexatr 14
January 31 2020, 07:47 #390971
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 64
January 31 2020, 08:14 #390972
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
healyhatman 9
January 31 2020, 12:08 #390976
 Answer
Set the input mask to integer
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
A
alexatr 14
January 31 2020, 12:14 #390977
Bildschirmfoto_2020-01-31_um_13.13.16.pngThx for your hint - the input mask is already set to integer but it allows leading 0 anyway.
Attachments
Bildschirmfoto_2020-01-31_um_13.13.16.png
Bildschirmfoto_2020-01-31_um_13.13.16.png
(114.67 KiB)
45 Downloads/Views
Bildschirmfoto_2020-01-31_um_13.13.16.png
Bildschirmfoto_2020-01-31_um_13.13.16.png
(114.67 KiB)
53 Downloads/Views
healyhatman 9
January 31 2020, 20:01 #390987
 1
 Answer
No that's the field validation. There's an input mask option.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
A
alexatr 14
January 31 2020, 20:17 #390988
thats the solution - many thanks