Copy link to clipboard
Copied
I am trying to find the way to prevent a text field from ever using decimals. I forgot the method?
Copy link to clipboard
Copied
Use this code as the field's custom Keystroke script:
event.rc = /^\d*$/.test(event.change);
Copy link to clipboard
Copied
Set field format to number and select 0 decimals.
Copy link to clipboard
Copied
that does not work. I want the field to accept WHOLE NUMBERS. no POINT NO COMMA NO LETTERS.
It might need js
Copy link to clipboard
Copied
Use this code as the field's custom Keystroke script:
event.rc = /^\d*$/.test(event.change);
Copy link to clipboard
Copied
TRY67 has the correct answer, as usual. Thank you. 🙂
Copy link to clipboard
Copied
Sorry, you did not have the correct answer, your method still allows the comma and period.