Matt Dunbar
Matt Dunbar

Reputation: 950

Don't show keyboard on iOS

Is there a way to NOT show the on screen keyboard on a website (loaded in safari) when a user clicks on an input type="text" field? I have javascript written to popup a mini "keypad" which I'd like to use instead.

Upvotes: 1

Views: 823

Answers (3)

I guess you could try to set the input disabled (disabled="disabled"), show your popup on click and finally update the field content via JS.

Upvotes: 1

Manlio
Manlio

Reputation: 10864

In a custom app of course you can. In safari I don't think so.

Upvotes: 0

Faizan S.
Faizan S.

Reputation: 8644

You cannot change device behavior from your javascript or website. Especially not if the user has disabled javascript.

The only thing you could do is to allow for all inputs and do server side validation to exclude the phrases or characters you do not wish to be entered.

HTH

Upvotes: 0

Related Questions