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

help! buggy javascript in a PDF form

sjsmith
Registered: Sep 2 2008
Posts: 28
Answered

i created a form using fillable fields with javascript calculations. the form is for submitting overtime and was requested to be as "idiot-proof" as possible. i set it up so that a user can put the date and their In and Out times, but the rest of the information (i.e. hours rounded to the .25 and such) would be automatically calculated.

everything works, but the calculations are usually one calculation behind. if i enter a date and both times, or go back and change times, the weekly totals will show the data as if i hadn't yet changed it. if i go back into a time field, change the time by one minute and tab out of the box, the weekly totals will reset to the correct result.

is there something i can do to fix this?

My Product Information:
Acrobat Pro 7.0.7, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
This is almost certainly due to the field calculation order being incorrect, so you need to make sure it set to what makes sense for your form: Advanced > Forms > Set Field Calculation OrderGeorge
sjsmith
Registered: Sep 2 2008
Posts: 28
george, you are a gentleman and a scholar. the field calculation order was the solution.

thanks for the speedy response.