numeric keypad for text field on mobile browsers
<p>I want to show a numeric keypad to user for a text field like credit card number, reservation number with hyphens(-) etc.</p>

<p>I tried to use the following </p>

<pre><code>type="text" pattern="[0-9]*" inputmode="numeric"
</code></pre>

<p>but it doesn't seem to work. I have tested only on Safari on iphone 5 &amp; 6.</p>

<p>with type and inputmode as "tel", I am able to get numeric keypad with special characters but not sure if its a good hack. </p>

<p>I would like to know if there are any better options than this.</p>