Any idea why the sessions/new.html.erb users autocomplete: “username” for the email field? I’m trying to add a separate username field and it’s behaving strangely. Can I change it to autocomplete: “email_address” ?
If you are using email field and a separate username field, you can use “autocomplete: email” and “autocomplete: username” on those fields respectively.
autocomplete: “email_address” is not valid as the autocomplete token should be from a predefined list. Please check more details here
Yeah, just use ‘email’ like they said. Tbh Rails probably went with ‘username’ as a safe catch-all since most password managers will autocomplete your email either way, but being explicit with ‘email’ is cleaner. Fair warning though — browser autocomplete behavior can be weird across different managers, so test it after you swap it over.