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

Autopopulate text field (editable) based on dropdown selection

Community Beginner ,
Sep 09, 2020 Sep 09, 2020

Copy link to clipboard

Copied

Hello,

 

I have a dropdown field called Department with 10 or so options and a text field called Manager. I have defined the export value per option under Department field and added the Custom Calculation script as event.value = this.getField("Department").value; to autopopulate the respective Manager field.

 

This is working fine but I want the user to be able to edit/overtype the autopopulated value in the Manager field and save the manually entered Manager name. Any suggestions with Acrobat DC Standard PDF form?

TOPICS
Acrobat SDK and JavaScript

Views

475

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 , Sep 10, 2020 Sep 10, 2020

Use this method;

 

if(event.source&&event.source.name=="Department"){
event.value = this.getField("Department").value;
 }

Votes

Translate

Translate
Community Expert ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

Use this method;

 

if(event.source&&event.source.name=="Department"){
event.value = this.getField("Department").value;
 }

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 Beginner ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

LATEST

Works well. Thank you so much!

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