A
A
Alex2022-03-24 14:17:18
HTML
Alex, 2022-03-24 14:17:18

How to force the browser to save a pair of login-password, if only the password is in the form?

There is a site with registration. Registration took place in two stages: First, the user enters an email, then confirms it, and then enters his password. The problem is that in the last step, the browser saves only the password without the login. The login entered earlier is known and it can be displayed as you like on the page. I tried to add a second, hidden field with a login. But the browser ignores it. How to make it so that after entering the password, the browser saves both the password and the login.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
AUser0, 2022-03-24
@AUser0

Leave the registration in such a divided form, but make the login form from 2 fields. Then both fields will be remembered.

A
ArturMavlidov, 2022-03-24
@ArturMavlidov

Take advantage of local storage .
At the first stage, set the email, at the second the password

P
Philipp, 2022-03-25
@zoonman

Add the attribute autocomplete="email", the browser will substitute the address automatically.

D
Dmitry Belyaev, 2022-03-25
@bingo347

You can save from the script, where it is supported
https://developer.mozilla.org/en-US/docs/Web/API/C...
https://developer.mozilla.org/en-US/docs/Web /API/P...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question