Skip to main content
lakshmir18362498
New Participant
March 3, 2019
Answered

restricting form field to numbers without separators on XI

  • March 3, 2019
  • 1 reply
  • 2829 views

restricting form field to numbers without separators XI

This topic has been closed for replies.
Correct answer try67

Technically, that still allows the user to enter the minus symbol and a period.

If you really want to only allow numbers you can use this code as the custom Keystroke script:

event.rc = /^\d*$/.test(event.change);

1 reply

JR Boulay
Community Expert
March 3, 2019

Hi

Acrobate du PDF, InDesigner et Photoshopographe
try67
try67Correct answer
Community Expert
March 3, 2019

Technically, that still allows the user to enter the minus symbol and a period.

If you really want to only allow numbers you can use this code as the custom Keystroke script:

event.rc = /^\d*$/.test(event.change);

lakshmir18362498
New Participant
March 4, 2019