Skip to main content
Participating Frequently
September 10, 2020
Answered

Autopopulate text field (editable) based on dropdown selection

  • September 10, 2020
  • 1 reply
  • 817 views

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?

This topic has been closed for replies.
Correct answer ls_rbls

Use this method;

 

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

1 reply

ls_rbls
Community Expert
ls_rblsCommunity ExpertCorrect answer
Community Expert
September 10, 2020

Use this method;

 

if(event.source&&event.source.name=="Department"){
event.value = this.getField("Department").value;
 }
veryviralAuthor
Participating Frequently
September 11, 2020

Works well. Thank you so much!