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

How to have a dropdown calculat 2 fields at once even this comletly diccernt choices,

New Here ,
Sep 29, 2016 Sep 29, 2016

I have a dropdown box the deals with the lowest chance of a mortgage payment and the highest chance of a monthly mortgage payment. The Drop down has four choices 30 year, 20 year, 15 year and 10 Year, When they choose a term (or Year)  30 20 15 or 10. I need two separate fields that need to be populated with a different set of  rates. The picture tells a thousand words,examp copy.jpg

TOPICS
Acrobat SDK and JavaScript
332
Translate
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 ,
Sep 29, 2016 Sep 29, 2016
LATEST

The basic structure would be something like this (for the left-hand field in your image):

var amount = Number(this.getField("Amount").value);

var term = Number(this.getField("Term").value);

if (amount!=0) {

     if (term==30) event.value = amount * 0.004702;

     else if (term==20) event.value = amount * 0.00580;

     // etc.

} else event.value = "";

Translate
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