Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

a currency entry field?

Is there a way to make a field on a sheet that will be formatted like currency? So there's a "$" at the start, and then every three numbers is separated by a comma. Players can enter any numerical value (whole numbers only is fine) and they get to see it formatted like money.
1720703481
vÍnce
Pro
Sheet Author
<input type="number" min="1" step="any" ... /> will allow a value with decimals, but no $ or commas. You could just include a "$" in the label outside of the input of course.  If you use <input type="text" ... /> anything could be entered including $ and commas. This can be a problem if you need to do calcs on that value though and would require sheetworkers to coerce a workable value.  Sheetworkers can also check if an input is valid and perhaps flag the field (ie red border or whatever...) alerting the user that the field needs to be corrected. Sheetworkers can be used to parse an attribute and set a new "properly" formatted attribute, but I'm not sure if a worker can validate and reformat the same attribute.  Probably, but I haven't done that myself.  One of our local js experts might comment or even provide a working example of how that might work.
Thanks. I worked around it by abstracting National Budget to a couple of 0-10 values. Much easier to work with.