Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Acrobat JS Text field properties query...

Contributor ,
Jan 12, 2021 Jan 12, 2021

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.

TOPICS
Acrobat SDK and JavaScript , Mac
523
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 13, 2021 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 13, 2021 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 13, 2021 Jan 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...

dialog.jpgexpand image

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

Thanks again in advance.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 13, 2021 Jan 13, 2021

Yes, I understood that. My answer still applies.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 13, 2021 Jan 13, 2021
LATEST

Thanks again for the help and the confirmation.

I wasn't sure if I'd explained things clearly enough.

Cheers!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines