I have a form for editing user details. When i select the form the password field already shows the password in its form field.. So when i just change the other things and then try to save the password also goes for updation.. How can i leave the password field blank.. This is so far what i have tried.. But no luck
<%= f.password_field :password, autocomplete: "off", class: "form-control", placeholder: "Leave as blank if you don't want to change password", value: "" %>
There is no problem with your code.
Try clear your remember password in browser. This is because you remembered user at the time of login. Try clear cache and every other thing.
Try following these steps:
Delete all your data
Taken and modified from: https://support.google.com/chrome/answer/95582?hl=en
EDIT: Previous hack no longer works on current Chrome. Now,
autocomplete="new-password"
is usable.Like this
<input autocomplete="new-password" type="password" />
=========== old answer ===========
Put this tag at first line of your form.
I think this isn't so cool, but it prevents the autocomplete of password field.