Skip to main content
Participant
February 25, 2023
Question

create a text field in Adobe Acrobat to only accept input in English characters

  • February 25, 2023
  • 1 reply
  • 657 views

How can we create a text field in Adobe Acrobat to only accept input in English characters?
If a user attempts to enter a non-English character, the input rejects.

 

Please Help me 🙂

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
February 25, 2023

You could restrict input to ASCII characters using a keystroke script. 

 

Use this custom keystroke script

if(!event.willCommit)
   event.rc = event.change.split("").every(function(a){return a.charCodeAt(0)< 128});

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often