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

Native Development

Reply
Developer
Developer
klz
Posts: 132
Registered: ‎08-24-2011
My Device: Z10 LE + Playbook
My Carrier: MTS Ukraine
Accepted Solution

numbers only in TextFiled

Hello there,

 

I need to allow users to use numbers only input data in TextField. And I have no idea how to do that. I see NumberAndPunctuation option as input mode, but it is not working for me because it allows to use special characters too.

 

Any help would be appreciated. 

 

Thanks! 

Thank you!
----------------------------
My Apps: Alchemy Game | Image Resizer | Jam! | Traffic Signs: USA | Radio Record
My Blog: http://bb10pro.com
Please use plain text.
Contributor
ThomasD
Posts: 26
Registered: ‎01-04-2013
My Device: Playbook
My Carrier: Telus

Re: numbers only in TextFiled

Hi kiz,

 

There are actually a few posts on this one already, check this out

 

http://supportforums.blackberry.com/t5/Cascades-Development/Preventing-non-numeric-key-presses-in-a-...

 

There is currently no - Numbers only keyboard.  You can give the javascript function a try in the post above.  Hope this helps.

Please use plain text.
Developer
Developer
klz
Posts: 132
Registered: ‎08-24-2011
My Device: Z10 LE + Playbook
My Carrier: MTS Ukraine

Re: numbers only in TextFiled

Hey, Thomas!

You rock. Thanks a lot!
Thank you!
----------------------------
My Apps: Alchemy Game | Image Resizer | Jam! | Traffic Signs: USA | Radio Record
My Blog: http://bb10pro.com
Please use plain text.
Contributor
ThomasD
Posts: 26
Registered: ‎01-04-2013
My Device: Playbook
My Carrier: Telus

Re: numbers only in TextFiled

You are welcome.
Please use plain text.