Hi, I'm pretty new to acrobat, but have a created several forms using the simple field notation tool. I have a form that does all of the calculations, but when I go to clear the form after testing, I keep getting an error message saying that the format of the fields doesn't match (but on the format tab, they do). You can click through the two messages and fill out the form, but the two "not matching" error messages come up after every field input. I can't have 50 people do this every time they need to use the form. I've googled this and one solution I found was to change the fomat of the two problem fields to "none" instead of a number. Which works, but the problem is that the form is used by lawyers and their assistants, and I don't know that they'll remember to round the two none numbers to get the proper monetary amount. So, I changed it back to the number for now. But I'm stuck. This is the last form for us to publish and then we start a new project. I've been trying to work out this error for three days. Any help getting the error message to disappear would be greatly appreciated. Thank you.
My field notation looks like this:
(twoweeks / dividedbydays) * fivesharp
totothers / almostquarter
wages_complete / wages_days * fivesharp
All of the calculations work, it's just gives me the fields don't match message when I clear the form. (And then if you go to fill it in again, without closing and re-opening, you get the error message as you fill in the entire document.)
If you need any other information, please let me know.
Thanks again!
The solution is to do the calculation using a script, taking into account the situation where the divisor is 0.
For example, you can replace this:
(twoweeks / dividedbydays) * fivesharp
with this:
event.value = "";
var twoweeks = getField("twoweeks").value;
var dividedbydays = getField("dividedbydays").value;
var fivesharp = getField("fivesharp").value;
if (dividedbydays!=null && dividedbydays!="" && dividedbydays!=0) {
event.value = (twoweeks / dividedbydays) * fivesharp;
}
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com