Skip to main content
Participant
February 21, 2023
Question

CUSTOM FORMAT FOR CURRENCY

  • February 21, 2023
  • 1 reply
  • 566 views

I have been using Acrobat's built-in format for "Numbers", but I have run into a little snag. I need to be able to use a "Custom Keystroke Script", but cannot do so unless I also use a "Custom Format Script".

 

I am fairly new to Adobe Javascript. Meaning, what I've used in the past to accomplish this has been a "Regex" formula. Which I've not been able to successfully use in this situation. (Am I missing something?)

 

I would greatly appreciate any help (possibly with an example), to find the solution to this issue.

 

 

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
February 21, 2023

You can use this:

if(event.value)
event.value = util.printf("$%,0.2f",event.value);
else
event.value = "";