Stefan Kendall Stefan Kendall -4 years ago 97
HTML Question

Showing an input that only allows numbers and the decimal point?

Is there any way to define an

that shows a keyboard input that only allows numbers and the decimal point (or comma for international users)?

<input type='tel'>
shows phone crap I don't need, and no decimal point

<input type='number' pattern='[0-9]*'>
shows all numbers, but no decimal point

What can I do to get the input I need?

Answer Source

If you were doing this in a bona fide iOS app, you could probably add buttons of your own on top of the keyboard, based on this question, which is about the accessory view but the same process would work.

Otherwise, IamChuckB is right and the five keyboard types given in the Apple Developer's Library are exhaustive.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download