Numeric Keyboard on number-only field (mobile device)

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
User avatar
aarlauskas
Veteran Member
Posts: 127
Joined: 2019-04-28 18:03
Location: Medway, UK

Numeric Keyboard on number-only field (mobile device)

Post by aarlauskas » 2020-12-27 23:10

Hi, The screenshot below is just an example, you tap on the Age field and it brings numeric keyboard on mobile device. Is this something that can be done on Appgini apps? I use my apps on mobile devices more than anywhere else and it would be really great to integrate this for fields like job numbers etc. I understand that the numeric keyboard itself is also part of the script, as this is definitely not my phone's keyboard. It will not force this keyboard on desktop browser.

You can access the page here: https://www.omnicalculator.com/health/vaccine-queue-uk

download/file.php?mode=view&id=2044&sid ... dc0e44036e
Attachments
numeric.jpg
numeric.jpg (69.97 KiB) Viewed 2710 times

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Numeric Keyboard on number-only field (mobile device)

Post by jsetzer » 2020-12-28 08:21

I'm not sure if I got your question right and if it will help you:

If you change the type attribute of your <input /> field from "text" to "number" this should show the devices' default numeric keyboard on enter. It should work out of the box in most modern smartphone browsers, I think.

Can be done using jquery.

Untested code:

Code: Select all

$j("#fieldname").attr("type", "number");
This will NOT show any custom javascript keyboard but the device's OS dependent built-in keyboard.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
aarlauskas
Veteran Member
Posts: 127
Joined: 2019-04-28 18:03
Location: Medway, UK

Re: Numeric Keyboard on number-only field (mobile device)

Post by aarlauskas » 2020-12-28 11:26

Thanks Jan! Really appreciate that! Your jquery line does the job well!

Post Reply