Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trigger.io and custom keyboards

I am using Trigger.io for Android platform and I am curious if I could alter the way input fields work.

I know that recently trigger.io released a native ui update, but the thing I need is something like this.

<input type="number" name="age" />  
// this should open a small numeric keyboard

<textarea name="comment"></textarea>
//this should open a custom keyboard with only keys I want on it

it it possible? Can it be done via native plugins? Or am I after something really hard to accomplish here?

like image 786
detay Avatar asked Nov 23 '12 12:11

detay


1 Answers

Setting type="number" on an input field already results in a numeric keypad being shown instead of the default one on both iOS and Android.

However, those will still be the default native keyboards. To customize them to only contain the keys you want you would have two options:

1) Write a native plugin to hide the default and show your own custom keyboard: http://docs.trigger.io/en/v1.4/modules/native/index.html

You would also need to write JavaScript to detect when the input element of the particular type you're interested in was in focus, and trigger the plugin method.

2) Create an HTML5 input keyboard to your own spec and have that show when you select the input element. You can prevent the default keyboard from showing using the suggestions here: Prevent keyboard from popping on textbox focus/click in iPad webapps

I'd be interested in hearing more about the use case where you need such a level of customization. Users are familiar with the default input keyboard elements so in general I would recommend sticking with them.

like image 59
Amir Nathoo Avatar answered Sep 25 '22 10:09

Amir Nathoo