Numeric fields without decimals
How can I prevent decimal digits in my form field? Rather than allowing bad entries I'd like to display an error message.
0
-
The Quantity form field control allows only whole numbers, which means that it displays an error message when anything else is entered. If you switch your control type to Quantity you should get the behavior your looking for.
It is also possible to restrict users from entering the decimal point in the first place, instead of displaying the error message, use Custom JavaScript as explained in this example - Auto Control Validation. Do be careful with custom javaScript solutions as you should retest your forms when you upgrade.0
Please sign in to leave a comment.
Comments
1 comment