Skip to main content
Participating Frequently
Sep 10, 2020 5:55 AM UTC
Answered

Autopopulate text field (editable) based on dropdown selection

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 is closed to new replies. Start a new post to keep the conversation going.
ls_rbls
ls_rblsCorrect answer
Community Expert
Sep 10, 2020 7:22 AM UTC

Use this method;

 

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

2 replies

ls_rbls
Community Expert
ls_rblsCommunity ExpertCorrect answer
Community Expert
Sep 10, 2020 7:22 AM UTC

Use this method;

 

if(event.source&&event.source.name=="Department"){
event.value = this.getField("Department").value;
 }
Translate
Technical Generalist
veryviralAuthor
Participating Frequently
Sep 11, 2020 4:04 AM UTC

Works well. Thank you so much!

Translate