Copy link to clipboard
Copied
I have created a form in Acrobat where I assigned numerical values to specific check boxes, I then created a text box that added up those values (“TotalValue”); where I am stuck is in trying to tie the total value to a second text box that display a message based on the calculated value. Please note, I have zero knowledge or skill with JavaScript.
As the custom calculation script of the second field you can use something like this:
var totalValue = Number(this.getField("TotalValue").value);
if (totalValue==0) event.value = "";
else if (totalValue<=2) event.value = "Bad";
else if (totalValue<=5) event.value = "Medium";
else if (totalValue<=8) event.value = "Good";
else if (totalValue<=10) event.value = "Excellent";
I just invented the numeric values and the text descriptions... You can change them to your actual ones, of course.
Copy link to clipboard
Copied
As the custom calculation script of the second field you can use something like this:
var totalValue = Number(this.getField("TotalValue").value);
if (totalValue==0) event.value = "";
else if (totalValue<=2) event.value = "Bad";
else if (totalValue<=5) event.value = "Medium";
else if (totalValue<=8) event.value = "Good";
else if (totalValue<=10) event.value = "Excellent";
I just invented the numeric values and the text descriptions... You can change them to your actual ones, of course.
Copy link to clipboard
Copied
Thanks! That worked perfectly!