Answered
I have developed a form in Acrobat 8 Prof.
(a) Theree are text field where i need the user to key in some number. The field lenght is 6. Now the requirement is to ensure that the field is populated with the numeric value keyed in by the user prefixed with zeros. i.e if the user key in 63 , the value in the field should be displayed as 000063. if he keys in 125 the value should be displayed as 000125.
pramod
The keystroke code uses the RegExp test to validate input keystrokes and set the event's return code:
event.rc = /^\d{0,6}$/.test(event.value);
The format code uses the "util.printf()" method to format with the leading zeros:
event.value = util.printf("%,306d", event.value);
George Kaiser