Activate keyboard layouts in forms
Activate keyboard layouts in forms
Detlef Jaeger
Posts: 11Questions: 2Answers: 0
Is there a possibility for mobile devices enabling the specific keyboard layout in forms or inline edit as provided in HTML5 (Input-Types)?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
AFAIK, the keyboard layouts on mobile devices are triggered by the type attribute on the HTML input - so using valid HTML input types should trigger the appropriate keyboard.
If it's not working, then I would suggest using your desktop browser Developer Tools and inspect the HTML to ensure your input types aren't being stripped out.
Which form input in DataTables / Editor is it that you want to do this?
Allan
Hello Joyrex,
thanks for the answer.
I forgot to mention that it's about the editor.
The question is: Is there a possibility to force mobile devices the specific keyboard layout?
(Input) type doesn't seem to work.
$(document).ready(function() {
editor = new $.fn.dataTable.Editor( {
ajax: "../php/staff.php",
table: "#example",
fields: [ {
label: "First name:",
name: "first_name"
}, {
label: "Numeric:",
name: " Numeric",
type: " Numeric"
}
]
} );
Use:
That will apply the
number
type to the input element, allowing the browser to select the required keyboard type itself.Allan
Hello allen,
many thanks.
This basically works but unfortunately not in my case.
I have an input field for a formula - for example: (12 + 5) * 6 / 2
With attr: {type: "number"} the correct keyboard layout is shown.
However the input will not be saved.
Is there a way to disable the number check?
attr: {type: "tel"} works but the keyboard layout isn’t optimal.
I'm afraid that number check is provided by the browser when you use an input of
type="number"
. That is not something that can be overridden as far as I'm aware.Allan