I’m playing around with Template Variables in Revo, and the "Number" TV is interesting:
http://rtfm.modx.com/display/revolution20/Template+Variable+Input+Types
I’ve updated the docs a bit, but I’m wondering if there’s a way to format the values entered here so they work for dollar amounts. In other words, I’d like to limit the input to be only 2 digits after the decimal point.
Related question: is the input limited according to the locale of the site? E.g. in Europe, we’d use the comma instead of the decimal point and vice versa -- what system setting affects this? And does it affect the behavior of the Number TVs?
Would it make sense to allow BOTH decimal points and commas so you could have numbers like "1,000.23"? Or would that defeat the purpose? I’m not sure if the purpose here is to allow general numeric input, or if it’s to filter input so the result can be used in mathematical calculations.
Another question: should this be used for phone numbers? Currently, only one minus sign is allowed.