Skip to main content
Known Participant
March 23, 2020
Question

Field population from another field

  • March 23, 2020
  • 3 replies
  • 1609 views

I have a field that is a dropdown with different interest rates.  I need the result of the entry to populate into another field so I can do further calculations base.  How do you do this?

This topic has been closed for replies.

3 replies

Participating Frequently
March 26, 2020

Thom Parker
Community Expert
March 24, 2020

Read this article (and look at the example):

https://acrobatusers.com/tutorials/change_another_field/

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
ls_rbls
Community Expert
March 23, 2020

 

Hi,

 

You need to add a custom calculation javascript.

 

For example, in the field that you need to pull a listed item from a dropdown menu field use something like this:

 

 

 

 

var dropdown = this.getField("dropdown field name here").valueAsString;

if (dropdown !="") event.value = dropdown;
else if(dropdown =="") event.value="";

 

 

mcctfcuAuthor
Known Participant
March 25, 2020

Ok, I add the script but now when I'm still having an issue with the periodic rate.  So, I have my form, that has one list box updated with the script in your example.  They choose the rate and that rate writes to the Periodic Rates form fields.  Then those fields, have a simple calculation of Purchase_APR/365, etc.  However, the last field for the Cash Advance Periodic rate is not calcualting when the Cash Advance APR changes.  It's holding the last rate and then if you click in the field while editing, it will update the field.  The other two are working fine, it's just this last field.  Thanks.

ls_rbls
Community Expert
March 25, 2020

Check the calculation order of your fields.

 

Are you able to share the form with us or post a screenshot?