The most recent solution of adding autocomplete="new-password"
to the password field works great for preventing Chrome from autofilling it.
However, as sibbl pointed out, this doesn't prevent Chrome from asking you to save the password after the form submission completes. As of Chrome 51.0.2704.106, I found that you can accomplish this by adding a invisible dummy password field that also has the attribute autocomplete="new-password"
. Note that "display:none" does not work in this case. e.g. Add something like this before the real password field:
<input type="password" autocomplete="new-password"
style="visibility:hidden;height:0;width:1px;position:absolute;left:0;top:0">`
This only worked for me when I set the width to a non-zero value. Thanks to tibalt and fareed namrouti for the original answers.