Copy link to clipboard
Copied
Ho to modify the following code just to add backspace and delete button to the allowed list.
var digits = /^\d$/;
if(event.willCommit == false){
if(event.change && digits.test(event.change) == false){
app.beep();
event.rc = false;
}
}
Copy link to clipboard
Copied
What is the issue with this script?
Copy link to clipboard
Copied
You may need to elaborate your question, it's a little difficult to understand the exact workflow that you're trying to achieve.
For example, are you asking to fornat a text field to display only numerical characters (no letters or special characters)?
And Are you also asking if you can add a button object to the PDF so that when a user clicks on it it will delete the numeric strings entered in that field in the same way like a backspace key would do when it is pressed repeatedly on an actual keyboard peripheral device?