Custom Calc Script for Drop Down Box selection value
i have drop down list called "effectivedate" 12 items (1/1/16; 2/1/16; 3/1/16 ... 12/1/16). need number of pay periods left in year based on effective date populate in text field. can see why custom calculation script not working?
var v = this.getfield("effectivedate").value;
if (v=="1/1/16") event.value = 26;
else if (v=="2/1/16") event.value = 24;
else if (v=="3/1/16") event.value = 22;
else if (v=="4/1/16") event.value = 20;
else if (v=="5/1/16") event.value = 18;
else if (v=="6/1/16") event.value = 16;
else if (v=="7/1/16") event.value = 14;
else if (v=="8/1/16") event.value = 11;
else if (v=="9/1/16") event.value = 9;
else if (v=="10/1/16") event.value = 7;
else if (v=="11/1/16") event.value = 5;
else if (v=="12/1/16") event.value = 3
else event.value = "";
**note: i'm using export values different purpose, can't use them this.
if have export values in drop-down values you'll when access value property, not display values.
More discussions in PDF Forms
adobe
Comments
Post a Comment