2

I have a sign up form with email and password/repeat-password fields, using Bootstrap 4 and jQuery. These get submitted to my API using jQuery $.post().

The issue is that even if the signup fails - for example if the email already exists - Chrome offers to save the password. This is annoying.

How can I prevent Chrome from doing so only if the signup fails, but not if it succeeds?

When searching I've only found questions and answers about how to completely disable the feature - but I want it to be disabled only if the POST failed, not if it was successful. Also, I do not wish to disable the password autocomplete feature.

Magnus
  • 17,157
  • 19
  • 104
  • 189
  • Just a guess: if submitting the form results in the same registration form being displayed, it may realize that the registration failed. – Barmar Jul 07 '20 at 22:40

0 Answers0