Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
bdg025
Posts: 5
Registered: ‎12-03-2010
My Device: Bold 9000 Version 4.6
My Carrier: Simulator

Input type="number" broken in BlackBerry Torch 9800 model OS Version 6.00.214 simulator

I have the following html tag Input type=number in the web page:

 

<input autocapitalize="off" class="formField" id="amount" maxlength="10" name="amount" type="number" value="" />

 

When i enter the number with decimal value(10.24)  in the input, i am unable to sumbit the page in the BlackBerry 9800 model OS Version 6.00.214 simulator.

 

When i enter number without the decimal value(10) in the input, i am able to sumbit the page in the BlackBerry 9800 model OS Version 6.00.214 or Version 6.0.0.337 simulator.

 

If i change the input type to textbox and enter the number with decimal value(10.24), i am able to submit the page . But i will have to write some custom javascript code to restrict the textbox to accept only number with decimal values.

 

But the Input type="number" works fine in BlackBerry Bold 9700(versio 5.0), Bold 9000(Version 5.0 and 4.7) and Tour 9630(Version 5.0 and 4.7) etc.

 

It appears to be issue only OS 6.0 version.

 

Is there any workarround for this issue?

Please use plain text.
New Member
futureperfect
Posts: 1
Registered: ‎12-09-2010
My Device: Not Specified

Re: Input type="number" broken in BlackBerry Torch 9800 model OS Version 6.00.214 simulator

[ Edited ]

This behavior is actually part ot HTML5 form validation.

 

If you want to disable client side validation for a form in HTML5 add a novalidate attribute to the form element.

 

Note that the spec calls for 

<form novalidate>

But this does no conform to XHTML.

 

I used

<form novalidate="novalidate">

And this solved my problem.

 

 

 

 

Please use plain text.
Contributor
mobistar
Posts: 11
Registered: ‎12-27-2010
My Device: Not Specified

Re: Input type="number" broken in BlackBerry Torch 9800 model OS Version 6.00.214 simulator

To accept decimal number, you can use the input type "number"  and use step="0.01" with it. 

This works fine on playbook but the torch form validation is buggy. 

It fails to accept cetain even number e.g. 2.22 but accespts 2.21,2.23 etc

Please use plain text.