We have a mobile forward data entry page that has an input:
<input type="text" id="result" ...>
Edit: I would like to strike through and/or omit this comment: "What I would like to do is default to the alphanumeric keyboard which is on the second level on my Android device (and I assume on other devices) where you have the numbers running across the top. Right now the above defaults to the alpha keys."
And replace with: What I would like to do is default to the mobile numeric keypad as a default but still allow a user to enter an occasional text entry.
I've tried using text="number" and text="tel" but that doesn't meet the requirement because although the typical entry is going to be something like "7.5" (thus the desire to default to the numeric keys) there will be cases where the user enters "pass" or "ok" or some other bit of text and I don't see a way to use "tel" or "number" and allow for the entry of text as well.
Edit:
My solution:
I found an elegant "workaround" for this. I simply added a checkbox to the form:
<label>
<input id="cbAllowTextResults" type="checkbox" value="">Allow entry of text results.</label>
And added a click handler to the checkbox that toggles the type between text and number based on whether the checkbox above is checked:
if ($("#cbAllowTextResults").is(":checked"))
$("#inputSresult").attr("type", "text");
else
$("#inputSresult").attr("type", "number");
This will allow and end user to toggle between text and number keyboard.