These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Comparing field contents

bsoldner
Registered: Nov 17 2006
Posts: 7

I have 2 read only fields (total1 and total2). The contents (data) is a result of calculations from other fields within the form. Those 2 fields do not collect the data from the same fields. The resulting data for fields total1 and total2 must be the same. Is there a way to alert the user when those 2 fields do not match?

This is a 14 page form and it's likely the user will may not complete the form all in one sitting. Some data pulled for total1 appears on page 4 and some data for total2 is pulled from page 7 and both fields (total1 and total2) with the remaining data appears on page 9. Also meaning the user has more pages to complete after page 9.

Thoughts anyone? Thanks in advance.

My Product Information:
Acrobat Pro 8.1.7, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2399
Sure, there is. It will involve a script that looks something like this:
if (this.getField("total1").value!=this.getField("total2").value) {app.alert("ERROR! total1 does not equal total2!",2);}

The question is, when do you want to perform this check? When the value of either field changes? When a button is clicked?

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

bsoldner
Registered: Nov 17 2006
Posts: 7
That is a good question and not sure how to resolve my quandary. The error message appears as soon as the user leaves the field on page 4.

Not sure a button/field would be the answer unless it can be activated after leaving the total2 field. However, total1 and total2 are read only. How about a script that upon viewing page 10 the error message appears by placing this script in the first field on page 10 and taking the user back to page 9 view? Too obnoxious for the user?

Thanks you have me thinking!!