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
Developer
praveen_rajan
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook
My Carrier: Not Specified

Tip for invoking Numeric Keypad for Playbook

HI,

 

The common Keypad in apps that appears for a text field is alphanumeric keypad. This is achieved by using

 

<input type="text" value="" />

 

Inorder to invoke a numeric keypad directly, you could use the following code.

 

<input type="number" value="" />

 

I guess this would be of some help.

 

Thanks,

Praveen

 

Please use plain text.
Developer
TheMarco
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: Tip for invoking Numeric Keypad for Playbook

Maybe others work too. input type="email" would be worth trying for example. Or "date".

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Please use plain text.
Developer
praveen_rajan
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook
My Carrier: Not Specified

Re: Tip for invoking Numeric Keypad for Playbook

[ Edited ]
yes, i guess those should work well in Playbook since it supports HTML5. These are additional options available in HTML5.
Please use plain text.
Developer
ChanneledDan
Posts: 29
Registered: ‎02-25-2011
My Device: PlayBook
My Carrier: Rogers

Re: Tip for invoking Numeric Keypad for Playbook

[ Edited ]

 

Thanks for the tip, since that's a very useful little feature in HTML5 and I'm glad the PlayBook supports it.

 

To expand on that, I just ran a quick test and it appears that the PlayBook supports all of the new HTML5 input types, listed here: http://www.w3schools.com/html5/html5_form_input_types.asp

 

The "email" and "url" types produce two separate, slightly different, keyboard layouts tuned to each type. The date picker pops up a nice... date picker! Also seems useful for WebWorks apps, though you may have to modify/rearrange/clarify the default data it inputs into the field.

 

The "range" type gives an interesting result: It's a slider, though it doesn't show the actual numeric value. This can however easily be augmented with a second field displaying the value of the first using some simple javascript.

 

Setting a "min" and "max" for the "number" type appears to have no effect however.

--------------------------------------
PlayBook Apps: EveryDay Converter
Please use plain text.