Languages
[Edit]
EN

HTML - disable form autocomplete

0 points
Created by:
Wiktor-Sribiew
350

In this article, we would like to show you how to disable form autocomplete in HTML.

Quick solution:

<form autocomplete="off"></form>

 

Practical example

In this example, we use the form element's autocomplete="off" attribute to disable the input elements autocomplete inside the form.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <form autocomplete="off">
    <label>
      <span>Field 1:</span>
      <input type="text" name="field-1" />
    </label>
    <br />
    <label>
      <span>Field 2:</span>
      <input type="text" name="field-2" />
    </label>
  </form>
</body>
</html>

References

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join