Skip to main content
deckarduk
Inspiring
January 12, 2021
Question

Acrobat JS Text field properties query...

  • January 12, 2021
  • 1 reply
  • 660 views

Hi there,

Please can someone tell me if I can set the 'Format category' to 'Date' and a 'custom' mask of 'ddmm' to a text field using JS? 

As yet I've not found the relevant properties to do this.

Thanks in advance.

This topic has been closed for replies.

1 reply

deckarduk
deckardukAuthor
Inspiring
January 13, 2021

Further to my last post, I've checked the Javascript Reference again and haven't found anything.

I can find references to various properties, for example creating combs, but nothing for dates etc.

Do I need to create the text field and then change the properties of it using util.printd ?

Thanks in advance.

try67
Community Expert
January 13, 2021

You need to use the setAction method to set the field's Format and Keystroke events, but the function to call are undocumented, as they are internal to Acrobat and not a part of the PDF spec.

try67
Community Expert
January 13, 2021

Hi Try67,

Thanks for the help.

My util.printd reference may have been incorrect.

What I'm trying to do is set up the new text field I add like this...

I'm trying to find the properties for the settings under the 'Format' tab.

Thanks again in advance.


Yes, I understood that. My answer still applies.