Re: Proposal for Input Money element type in HTML5

On Fri, Feb 27, 2015 at 10:19 PM,  <buhake.sindi@sindi.co.za> wrote:
>
> Greetings everyone.
>
> I will like to request that HTML5 be introduced with the following type of
> input:
>
> <input type="money" />
>
> This input will allow us to select the selected currency (ISO 4217 currency
> code), which can be referenced also from the HTML5 datalist, as well as
> input 2 numeric fields: the numerator (dollars) and denominator (cents) (for
> lack of better word).

I think the notion of users being able to select the currency together
with setting a denomination value is not desirable by default - web
services tend to be defined within a specific currency and would not
usually have the capacity to handle any currency and the conversions
necessary to equate what the denomination value represented at a
specific time.

However, i think there is a case for a monetary-value input type which
would be set within a specific currency for the page/input. This would
use the locale currency conventions for display and allow
input/editing of the denomination.

There is possibly also a case for a new input type for a currency-code
which would be populated corresponding to currency code lists, with
integration with datalist as you suggest.

Together the two inputs could be combined to form the type of
interface you propose, however as discrete fields for composition by a
page author.

There have been previous discussions about using the number input type
together with the pattern attribute for handling currency values
however the complexity of currencies seems to curtail this approach.

For some reference, i think it's worth having a look at the Java JSR
354: Money and Currency API for some background into some of the
complexity of handling currencies and denominations, especially if we
also consider BitCoin, Facebook credits and other virtual currencies
not covered by ISO.

I've created a bug within the WHATWG HTML product to capture where
this functionality might go:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28137

Thanks,
Cameron Jones

>
> The numeric input can be a simple text field or a spinner. The advantage of
> this is that we can have a valid input field that web applications can
> capture, and web applications can easily recognize the value of the money
> returned from the client in the form of:
>
> "USD XXXXX.yy" (3 character currency code).
>
> The developer can specify how many decimal values he/she can accept (or
> maximum decimal value) and maximum amount he/she can accept overall.
>
> Right now, developers have to resort to custom made their own input
> components and there is no consistency amongst applications. This
> consistency will help also for those doing payment processing as they can
> link the input directly to their payment processing service.
>
>
> Sorry if this is not the right platform for this but I believe that this is
> long overdue.
>
>
> Kind Regards,
>
>
>
> Buhake Sindi
> www.sindi.co.za
>
> ----- End forwarded message -----
>
> ----- End forwarded message -----
>
>
>
> ---------- Forwarded message ----------
> From: sindimsh@sindi.co.za
> To: buhake.sindi@sindi.co.za
> Cc:
> Date: Thu, 26 Feb 2015 10:00:56 +0000
> Subject: Fwd: Proposal for Input Money element type in HTML5
>
>
> ----- Forwarded message from sindimsh@sindi.co.za -----
>    Date: Thu, 26 Feb 2015 09:52:54 +0000
>    From: sindimsh@sindi.co.za
> Subject: Proposal for Input Money element type in HTML5
>      To: public-html@w3.org
>
> Greetings everyone.
>
> I will like to request that HTML5 be introduced with the following type of
> input:
>
> <input type="money" />
>
> This input will allow us to select the selected currency (ISO 4217 currency
> code), which can be referenced also from the HTML5 datalist, as well as
> input 2 numeric fields: the numerator (dollars) and denominator (cents) (for
> lack of better word).
>
> The numeric input can be a simple text field or a spinner. The advantage of
> this is that we can have a valid input field that web applications can
> capture, and web applications can easily recognize the value of the money
> returned from the client in the form of:
>
> "USD XXXXX.yy" (3 character currency code).
>
> The developer can specify how many decimal values he/she can accept (or
> maximum decimal value) and maximum amount he/she can accept overall.
>
> Right now, developers have to resort to custom made their own input
> components and there is no consistency amongst applications. This
> consistency will help also for those doing payment processing as they can
> link the input directly to their payment processing service.
>
>
> Sorry if this is not the right platform for this but I believe that this is
> long overdue.
>
>
> Kind Regards,
>
>
>
> Buhake Sindi
> www.sindi.co.za
>
> ----- End forwarded message -----
>
>
>
> ---------- Forwarded message ----------
> From: sindimsh@sindi.co.za
> To: public-html@w3.org
> Cc:
> Date: Thu, 26 Feb 2015 09:52:54 +0000
> Subject: Proposal for Input Money element type in HTML5
>
> Greetings everyone.
>
> I will like to request that HTML5 be introduced with the following type of
> input:
>
> <input type="money" />
>
> This input will allow us to select the selected currency (ISO 4217 currency
> code), which can be referenced also from the HTML5 datalist, as well as
> input 2 numeric fields: the numerator (dollars) and denominator (cents) (for
> lack of better word).
>
> The numeric input can be a simple text field or a spinner. The advantage of
> this is that we can have a valid input field that web applications can
> capture, and web applications can easily recognize the value of the money
> returned from the client in the form of:
>
> "USD XXXXX.yy" (3 character currency code).
>
> The developer can specify how many decimal values he/she can accept (or
> maximum decimal value) and maximum amount he/she can accept overall.
>
> Right now, developers have to resort to custom made their own input
> components and there is no consistency amongst applications. This
> consistency will help also for those doing payment processing as they can
> link the input directly to their payment processing service.
>
>
> Sorry if this is not the right platform for this but I believe that this is
> long overdue.
>
>
> Kind Regards,
>
>
>
> Buhake Sindi
> www.sindi.co.za
>
>

Received on Wednesday, 4 March 2015 14:46:52 UTC