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

Is there a way to get the name of the own field itself ?

Participant ,
May 18, 2020 May 18, 2020

Copy link to clipboard

Copied

Is there a way to get the name of the own field itself where the code is written, in the code that writes in the field?

 

For example, if I have a field named "ABC".

    var x = this.getField ("ABC");
    event.value = x.name;

It will be "ABC",

 

Is there a way to avoid to writing own field name ?
    var x = this.getField ("ABC") ;

TOPICS
Acrobat SDK and JavaScript

Views

688

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

correct answers 1 Correct answer

Community Expert , May 18, 2020 May 18, 2020

Hi,

you should be able to "event.target.name", as it should return the name of the field.

Regards

Malcolm

 

Votes

Translate

Translate
Community Expert ,
May 18, 2020 May 18, 2020

Copy link to clipboard

Copied

Hi,

you should be able to "event.target.name", as it should return the name of the field.

Regards

Malcolm

 

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
Participant ,
May 18, 2020 May 18, 2020

Copy link to clipboard

Copied

wow! thank you!

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 ,
May 19, 2020 May 19, 2020

Copy link to clipboard

Copied

LATEST

or "event.targetName"

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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