I have a calculator setup based on this and would like to add comma separators to the main result. Can anybody offer any tips how I might achieve this?
I have followed the instructions from this post by @cyberdave and been able to add commas to a number value inserted into an html embed with this code:
<script>document.write(numberWithCommas('value'));</script>
…but not yet been successful in applying it to a specific class or id, like my calculator result. Any help would be greatly appreciated.
ruben-ad
(Rubén Sey)
November 2, 2020, 6:34pm
2
I have the same problem. Kind of surprised that such a basic point is such a big issue with Webflow. Can anyone help?
Hi @Mark & @ruben-ad , I used to write a function which would format number with a comma. Have a look at that codepen , might give you what you need.
Hope that helps.
ruben-ad
(Rubén Sey)
November 3, 2020, 10:21am
4
Hi @anthonysalamin
Thank you very much for your quick support here. Your solution is actually quite nice, but not exactly what I’m looking for. It’s actually simple.
I have this page here, where I’m showing the price filled in a number field: https://editorial-alma.webflow.io/libros/el-cuervo
In Europe we use a comma to separate the decimals, so I just want to replace the dot with a comma.