quarta-feira, 14 de setembro de 2016

Programação Web - Disable Autocomplete, Autocapitalize, and Autocorrect

Mobile and desktop browser vendors do their best to help us not look like idiots by providing us autocomplete, autocorrect, and autocapitalize features.  Unfortunately these features can sometimes get in the way;  we don't always want or need the help they provide.  Luckily most browsers allow the developer to remove these features in the cases they aren't desired!

The HTML

Disabling these three native mobile features is as easy as a few simple HTML attributes:
<input autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />

<textarea autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
Any or all of the autocorrect, autocomplete, and autocapitalize attributes can be used on a given element to prevent the given corrective feature.
While I love these features, they aren't always applicable and when they aren't, users get frustrated.  Keep these attributes in mind when using forms on your desktop or mobile site!

fonte: https://davidwalsh.name/disable-autocorrect

links:
---- acho que da pra adaptar para php
https://www.drupal.org/node/2487808

https://css-tricks.com/snippets/html/autocomplete-off/

0 comentários: