Skip to content

Form autocompletion

wvengen edited this page Dec 22, 2013 · 10 revisions

Most, if not all, browsers offer to a) provide autocompletion for form fields based on previous inputs, and b) offer to remember username and password. This can be very convenient. This can be very annoying when it happens at the wrong places (like filling in your password in an edit form for another user).

Currently (end 2013), both autocompletion and password remembering is controlled with the autocompletion option. Browser support has subtle differences. See these answers and hacks, as well as Mozilla and Microsoft notes.

Desired behaviour

  • Create user
    • browser doesn't fill in username&password
    • browser doesn't autocomplete password when entering a recognised username
    • browser doesn't save username&password on edit form
    • browser may autocomplete other fields like surname
  • Login
    • browser doesn't offer username&password from create user form
    • browser offers to remember password on login
  • Login again (after logout)
    • browser offers to autocomplete username&password
  • User profile
    • browser doesn't fill in username&password (or confirmation fails when not changing password)
    • browser doesn't fill in in password when entering a recognised username
    • browser may save username&password when entered
  • Signup (with plugin)
    • browser offers to remember username&password on signup

Notes for forms

  • Make sure to put the username field just before the password field.
    • For foodsoft's user_form_fields, this means email, then nick (when use_nick is not false), then password and password_confirmation.
  • When not desiring autocomplete, set autocomplete=off the desired fields or forms.

Browsers to test

  • Firefox
  • Chromium
  • Safari
  • IE
Clone this wiki locally