Copy link to clipboard
Copied
The 3year radio button value is 36 and 5year radio button value is 60. So the amount saved per month X period = Total saving Value it’s fine.
But in the tax free bonus if we select 3years it must be Save per month X 1.1
if we select 5years it must be Save per month X 3.2
I used this code
But it’s not working only the 5year value is reflecting not the 3 year.
Copy link to clipboard
Copied
Only the last condition is triggered in your script.
Use this:
if(this.getField("year").valueAsString === "36")
event.value = Number(this.getField("save_month").valueAsString) * 1.1;
else if(this.getField("year").valueAsString == "60")
event.value = Number(this.getField("save_month").valueAsString) * 3.2;
else
event.value = "";
Copy link to clipboard
Copied
I've moved your post to the Adobe Acrobat forum for you. Can you show a screen shot that includes the other related fields?
Jane
Copy link to clipboard
Copied
Thanks but i sorted out, This is the code
Copy link to clipboard
Copied
What are the names of the radio buttons?
Copy link to clipboard
Copied
Only the last condition is triggered in your script.
Use this:
if(this.getField("year").valueAsString === "36")
event.value = Number(this.getField("save_month").valueAsString) * 1.1;
else if(this.getField("year").valueAsString == "60")
event.value = Number(this.getField("save_month").valueAsString) * 3.2;
else
event.value = "";