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

Any way to display export value in field after selecting Item Value?

New Here ,
Jul 23, 2018 Jul 23, 2018

Copy link to clipboard

Copied

I'm trying to create a form that captures a lot of data, particularly vehicle accident data.  Some of the item values are very long.  What I would like to do is to allow those completing the form to select the Item value from the drop-down box, but populate the form with the export value, which I plan to have as numerical.  So if we have item values of Apple, Banana, and Cookie, with corresponding export values of 1, 2, 3, when the user selected Banana, the form would display 2.  Can that be done?  Any help would be appreciated.  Thank you.  

TOPICS
Acrobat SDK and JavaScript

Views

215

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 ,
Jul 23, 2018 Jul 23, 2018

Copy link to clipboard

Copied

LATEST

Yes, very easily. Just apply the numeric values as the export values of the items in your drop-down and then use something like this as the custom calculation script of the text field where you want to display them:

event.value = this.getField("Fruit").valueAsString;

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