Created
August 26, 2014 19:12
-
-
Save miohtama/d3fae1eddad9d5ea65e1 to your computer and use it in GitHub Desktop.
Disable password autocomplete for Chome and Safari
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
Fix broken autocomplete on Chrome. | |
Chrome tries to guess that username is before the password field on the form, | |
wrongly autocompleting the username to the amount field. | |
http://stackoverflow.com/questions/10938891/disable-autofill-in-chrome-without-disabling-autocomplete | |
{% endcomment %} | |
<input type="foobar" name="autocomplete_trap" id="autocomplete_trap" autocomplete="off" style="display: none;"> | |
{% if form.password %} | |
{% include "bootstrap/field_vertical.html" with field=form.password %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment