Question

I have a field that I've labeled 'password', and I'd like the browser to ask the user whether they want to store that password. How do I do this? Is there an HTML attribute to use?

For instance the HTML for the form would be:

<form action="" method="POST" name="form">
Enter password:
<input type="text" name="password" /><br />
A checkbox
<input type="checkbox" name="some_checkbox" value="Yes" /><br />
A textarea<br />
<textarea name="input_text" cols=40 rows=10></textarea><br />
<input type=submit value="Submit">

And I'd like the browser to prompt for storing the 'password' input.

Was it helpful?

Solution

This should do it:

<input type="password" name="password" />

Note the proper type for the password box.

OTHER TIPS

You can't explicitly force the browser to show that dialog, but using the correct elements gives the browser a helping hint.

So make sure your password element has the type="password" attribute.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top