This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28137 - Currency form input types
Summary: Currency form input types
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
Depends on:
Reported: 2015-03-04 14:45 UTC by Cameron Jones
Modified: 2015-09-02 09:36 UTC (History)
3 users (show)

See Also:


Description Cameron Jones 2015-03-04 14:45:32 UTC
There is the potential to enhance forms with specific inputs for handling currencies and denominations. 

Previous suggestions have included using the input type="number" together with the pattern attribute for controlling user input however there may be greater capability possible through introducing new input types together with locale-based display conventions: 

Mailing list thread:
Comment 1 Ian 'Hixie' Hickson 2015-03-04 22:07:03 UTC
I think we're probably best off having people use custom elements for this.
Comment 2 Cameron Jones 2015-03-05 13:00:59 UTC
I don't think this is any more difficult for implementation than of type="number" and the localization rules for currencies are quite different as the link to msdn shows. This would require integrating with BCP-47 and the CLDR again which is being looked at over in i18n at present.

I think having currency as a built-in type would be beneficial for the web as a whole as it would provide developers with a standard UI widget to use and it would provide users with a predictable and standard interface across all sites they visit.
Comment 3 Ian 'Hixie' Hickson 2015-03-30 22:24:43 UTC
Yes, each individual new form control is usually pretty trivial, but there's a cost to each one.
Comment 4 Anne 2015-09-02 09:36:02 UTC
Concur, custom elements need to pave the way here. If this turns up everywhere and gets native platform support and such we can reconsider.