Hallo,
I hope somone can help me with script.
I need an editable PDF file that have two text field. text field1 have price, text field2 shoud be calculate automaticly monthly payment,
Example:
if the price in filed1:100-300 $---------------shoud be in field2 $10/monthly.
if the price in filed1:301-349 $------------shoud be in field2 $11/monthly.
if the price in filed1: 350-399 $------------shoud be in field2 $12/monthly.
if the price in filed1: 400-449 $------------shoud be in field2 $13/monthly.
thanks
For the "field2" custom calculation script, one could use:
// get the value of "field1"
var nPrice = this.getField("field1").vallue;
// set monthly payment base on the range of value of field1
switch(true) {
case (nPrice >= 100 && nPrice < 301) :
// price is greater than or equal to 100 and less than 301
event.value = 10;
break;
case (nPrice >= 301 && nPrice < 350) :
// price is greater than or equal to 301 and less than 350
event.value = 11;
break;
case (nPrice >= 350 && nPrice < 400) :
// price is greater than or equal to 350 and less than 400
event.value = 12;
break;
case (nPrice >= 400 && nPrice < 450) :
// price is greater than or equal to 100 and less than 301
event.value = 13;
break;
default:
// all other prices
event.value = "";
break;
}
North America
Europe, Middle East and Africa
Asia Pacific