Sep 13, 2011

Turn Off Autocomplete for Input (iPad, iPhone, iPod)

Just use the autocomplete attribute:

<input name="q" type="text" autocomplete="off"/>

This would be useful when a text input is one-off and unique. Like a CAPTCHA input, one-time use codes, or for when you have built your own auto-suggest/auto-complete feature and need to turn off the browser default.

To make your web application iPhone and iPad friendly, you can also control whether or not automatic correction or capitalization is used in your form’s input fields. This can come in handy for username fields. Do so by implementing code along the following lines:




  1. To turn off autocorrect:


    <input type="text" name="some_name" autocorrect="off"></input>

    To turn off autocapitalize:


    <input type="text" name="some_name" autocapitalize="off"></input>

No comments: