Skip to main content
bjones1
Participating Frequently
September 29, 2016
Question

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

  • September 29, 2016
  • 1 reply
  • 369 views

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,

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
September 29, 2016

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 = "";