Skip to main content
Inspiring
December 13, 2017
Answered

Get selected field(s)

  • December 13, 2017
  • 3 replies
  • 3146 views

When in "Prepare Form" mode in Adobe Acrobat Pro DC, is there a way to get the selected field name(s) via JavaScript? I would like the user to be able to select a field (or multiple fields), and then click a custom button under "Add-ons" so that I can bring up my own custom dialog. I don't want to write a C++ plugin. Thanks in advance.

This topic has been closed for replies.
Correct answer try67

No, can't be done.

3 replies

Inspiring
December 13, 2017

Ok thanks. And just to confirm, there's no way to add to the "Field Properties" UI is there?

try67
Community Expert
Community Expert
December 13, 2017

Not with JS.

Inspiring
December 13, 2017

Thanks for the reply. Is there any work around for this? Or do I need to create a generic dialog that gives them a field selection list where once they select a field I programmatically modify some of the properties I'm allowing them to change? In this case metadata...

Also, can this be done in C++? Also wondering if I could add a context menu item via C++ and have it call a JavaScript function passing the field name in context or is there no way to bridge the two programming languages?

try67
Community Expert
Community Expert
December 13, 2017

If that's what you want to do then yes, you would need to display a list of the field names and have the user select from it (or have them enter the field's name into a text field, or something like that).

I don't know about whether it can be done using C++. Try the Acrobat SDK forum. I doubt it, though.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
December 13, 2017

No, can't be done.