Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Editing currency fields in a web-app

 
Jon Baxter
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a text box where the client can enter a $ amount. Whats the industry standard for text entry in these fields, does one allow specifying
characters such as "$" and ",".

I mean is the industry standard to entry either a,b,c below in a text box for a $ amount.

a) 10000.45
b) 10,000.45
c) $10,000.45

For b,c the server side would have to have extra logic for removing $ and , for
 
Senthil B Kumar
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The user should be entering only the amount in numbers, the formatting can be handled by writting a common taglib for the money fields.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65537
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't believe there's any industry standard other than making things easy for the user. I would allow any of those, or any other deterministic, formats to be entered and have the server do the "extra work" rather than making the user do it.
 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!