Skip to main content
deckarduk
Inspiring
Jan 12, 2021 5:17 PM UTC
Question

Acrobat JS Text field properties query...

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 is closed to new replies. Start a new post to keep the conversation going.

5 replies

deckarduk
deckardukAuthor
Inspiring
Jan 13, 2021 9:52 AM UTC

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.

Translate
try67
Community Expert
Community Expert
Jan 13, 2021 10:00 AM UTC

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.

Translate
deckarduk
deckardukAuthor
Inspiring
Jan 13, 2021 10:15 AM UTC

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.

Translate