I'm trying to figure out how to get a field to accept numbers only. And if there is a leading zero it should keep it.
00125
12345
22356
04569
The easiest way to format a field for numbers is with the format tab in the field properites but it won't keep a leading zero as far as I can see. And I can't get regular expressions to work. Or at least I can't figure out how to make it work with a regular expression.
Will anyone help me figure this out? Please.
You can do this with a custom keystroke script using a regular expression. This is a copy-n-paste example from www.pdfscripting.com -
if(!event.willCommit)
event.rc = /^\d*$/.test(event.change);
Hope this helps,
Dimitri
WindJack Solutions
www.windjack.com
www.pdfscripting.com
Dimitri Munkirs
WindJack Solutions
pdfscripting.com