Currency: wrong decimals on summary page

By: Thomas Kutscher | Asked: 10/12/2023
ForumsCategory: General questionsCurrency: wrong decimals on summary page
Thomas Kutscher asked 6 months ago
hi there, the decimal places of the currencies in the form fields are different from those on the overview page at the end. How can I fix this? The calculations are correct and the total amount has the correct decimal places. Only the values on the overview page are too high by one decimal place. Please take a look at the attached screenshots.   thanks, tom
Victor Font replied 6 months ago

Looking at the front end shows the problem, but a developer cannot fix the problem without understanding how the field is setup in the form builder. I can see your CCY is the Euro setup as a numeric field. And I can see the difference in the summary page where the values appear to have been multiplied by 10. How are you generating the summary page? Are you using the built-in summary field?

Next, are you using an input mask on the fields? Is it REGEX?

I've seen decimal discrepancies because of calculation precision. Are there calculations going on any where on your form before the summary displays?

It's hard to surmise what's happening without hands on access to a site. Perhaps another few screen captures of these fields' settings in the form builder will help clarify a solution. The more you can show, the better. If you're using any custom code for calculations, please use pastebin, gist, or the like, and provide a link we can review publicly. Pasting code directly into these comments is a miserable experience. Trust me on that!

1 Answers
Thomas Kutscher answered 6 months ago
Dear Victor, thanks for your answer.   #1 the summary field is the built-in one. No extra configs here. #2 before the summary page appears, all entered values on the tab "travel expenses" are summed up. This value is calculated correctly. #3 i don't use any additional input mask on the fields. I attached to screenshots of an inout field and the summary field. thanks, tom

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community