After I fill in all my form fields using Merger, my calculated fields don't calculate. This is critical to our solution. Is there a way to force them to calculate. Are you aware of another API that can force a calculate event to occur? I'm sure you have run into this with other clients. Thanks
Calculated Form Fields
Re: Calculated Form Fields
Support · Apr 26, 2006The problem is not with the merging of the PDF with our API. You see, all the form field level JavaScript that is used to calculate the values is preserved even after the PDF is merged. The problem is that there is nothing triggering the form field level JavaScript to be executed. The event that would typically cause the values to be calculated is a mouse click inside of the form field (done through the PDF viewer) and there is no way to imitate a mouse click from our component.
There are however two optional workarounds for getting your values to appear as calculated on the PDF. The first would be to add the JavaScript for calculating the form field to the document level (right now the calculations are at the form level). This way the JavaScript will be triggered when the document is opened and the appropriate calculations would then be made at that time (right now the form field JavaScript is only triggered when the form field is clicked into).
The alternative option would be to perform the form field calculations inside your application (therefore not needing the JavaScript on the PDF at all). This way you would just reference the form field values directly from within your application, perform the necessary calculations then place the newly calculated value back into the appropriate form field.
Thanks,
ceTe Software Support Team
Re: Calculated Form Fields
Forum member · Apr 27, 2006I was able to figure this one out. The event that needs to fire is calculateNow. This can be triggered using document level javascript in the pdf.
this.calculateNow;
is the code that needs to be called. FYI
Re: Calculated Form Fields
Support · Apr 27, 2006Thanks for the update, this will be useful.
Thanks,
ceTe Software Support Team