Mobile App Keyboard selection

0
Hello, Is it possible to select a specific keyboard layout for a mobile app? Is it possible to select a specific keyboard layout for a certain page within a mobile app?   I'm working an app whereby the user can only entered numbers on a page, it would be nice if they could go straight to the numbers only keyboard layout. Can any one tell me if this is possible please, if so, how do you go about doing it? Thanks in advance. Regards Adrian
asked
2 answers
5

use the https://appstore.home.mendix.com/link/app/5958/TimeSeries/Set-Attribute for setting this:

 

put a class (in our case) hours on the textbox 

This will show numeric keyboards on mobile, prevent chars other than 0 - 9 and a , and prevents copy/paste unwanted chars and with a maximum of 2 digits. Feel free to adjust ;-)

 

To go all the way you can also add some HTMLsnippets below to get some auto focus and select on the field on loading of the page with this:

setTimeout(function(){dojo.query('.hours input')[0].focus(); dojo.query('.hours input')[0].select(); },500);

and want to have a auto save function add this also (and make sure there is a mf button with the class saveButton and this button must have an on changeEvent to save your value). The focus will trigger that event :)

$('.hours').keypress(function (e) {
 var key = e.which;
 if(key == 13)  // the enter key code
  {
    $('.saveButton')[0].focus();
    return false;  
  }
});  

 

answered
0

Hi Pim,

I'm struggling to get this configured - I've tried the github to get the "test" project but It won't load. :(

Can you tell me where I'm going wrong?

I've entered the following settings

And this is on the page above next to the input text box:

and I've added the class to the textbox:

Cheers

Adrian

 

 

answered