Re: Proposal for Input Money element type in HTML5

Hi Cameron,

It's funny, because I used JSR 354 - Money and Currency API to email  
this request. I even blogged about this API in my blog  
(http://theelitegentleman.blogspot.com/2015/02/money-problem-no-more-money-problem.html).

The reason I request this is due to the various MVC frameworks that  
spring up in various development languages and platforms.
For one, I created a JSF 2 complaint HTML5 component that I use  
throughout my application and searching online I realized that
there were various solutions to capturing money and currency so it  
depend on developers' taste and interpretation.

JSF components have UI input and output component subclasses (of  
UIComponent) thus allowing capturing and displaying of values  
respectively. This can be also useful if we could have a input and  
(perhaps) a <money> tag for display purposes.

A solid <input type="money" /> input would make it consistent  
throughout applications and consistent in passing the values in  
various services including if using Javascript async services calls.


Kind Regards,



Buhake Sindi
www.sindi.co.za

PS. I have not committed my JSF 2 HTML5 library on a public version  
control system. It's still in testing phases.



Quoting Cameron Jones <cmhjones@gmail.com>:

> 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 Friday, 6 March 2015 04:23:37 UTC