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

Acrobat JS Text field properties query...

Contributor ,
Jan 12, 2021 Jan 12, 2021

Copy link to clipboard

Copied

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

Views

295

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.jpg

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

Thanks again in advance.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Yes, I understood that. My answer still applies.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Thanks again for the help and the confirmation.

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

Cheers!

Votes

Translate

Translate

Report

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