Home > Software engineering >  Difference between autocomplete = "disabled" and autocomplete = "off"
Difference between autocomplete = "disabled" and autocomplete = "off"

Time:12-28

What is the difference between both of those, when I use autocomplete = "off", I'm still able to get a drop down and able to fill emails. I'm using edge, below are screenshots for reference

autocomplete = "off"

autocomplete = "disabled"

CodePudding user response:

It is form attribute autocomplete="off" and autocomplete="false" for input field disabled

<form autocomplete="off">
    <input id="email" autocomplete="false" name="email" type="email">
</form>

CodePudding user response:

disabling the autofill with jQuery

<body>
    <form id="login-form">
      <label for="fname">First Name:</label>
      <input type="text" id="fname" name="fname"/>
      <label for="email">Email:</label>
      <input type="text" id="email" autocomplete="false" name="email">
    </form>
    <script>
      $(function() {
        $('#login-form').disableAutoFill();
      });
    </script>
  </body>

  • Related