On 11 January 2012 03:19, Foo Shyn Chung <[email protected]> wrote:
> Hi Adrian,
>
> I did tried but the mask attribute is actually creating a fixed width
> input, and i'm not looking at that. I just need a simple numeric only text
> input, regardless of width.
>
> Any idea please?

Hi FooShyn,

I don't think OFBiz widgets can help you for that, because in html(4)
you cannot restrict inputs to be only digits.

You need to write a small javascript and check when the user types in
that field.
It is really easy to do that with jQuery which is available in OFBiz.

Or wait for html5 support which has numeric field type.

HTH
Bilgin

>
> Thanx
> FooShyn
>
> On Tue, Jan 10, 2012 at 8:21 PM, Adrian Crum <
> [email protected]> wrote:
>
>> Use the mask attribute in the <text> element.
>>
>> -Adrian
>>
>>
>> On 1/10/2012 7:48 AM, Foo Shyn Chung wrote:
>>
>>> Hi all,
>>>
>>> I have an input which is suppose to be numeric only. On the form the field
>>> i use is text, however i have problem trying to make it numerical only.
>>>
>>> Have tried googling around but found not viable solution, any help?
>>>
>>> FYI i'm using the Form Widget to generate the form, not freemarker
>>> template.
>>>
>>> Thanx
>>> FooShyn
>>>
>>>

Reply via email to