When default_value for password field is set it does not show on page. This is because in theme_password html property for value is not set.
I attached a patch that fixes this.
| Comment | File | Size | Author |
|---|---|---|---|
| form.inc.patch_3.txt | 928 bytes | Rok Žlender |
When default_value for password field is set it does not show on page. This is because in theme_password html property for value is not set.
I attached a patch that fixes this.
| Comment | File | Size | Author |
|---|---|---|---|
| form.inc.patch_3.txt | 928 bytes | Rok Žlender |
Comments
Comment #1
Rok Žlender commentedAfter talking with some people on irc I came to realize that this might be a security feature. If this is so it should be corrected on http://api.drupal.org/api/HEAD/file/developer/topics/forms_api_reference... to show that password field cannot have default value.
Comment #2
moshe weitzman commentedthis is a browser limitation, not drupal. and yes, is a security consideration. docs would be useful.
Comment #3
chx commentedComment #4
ronaldmulero commentedold issue
Comment #5
f0nZ commentedYou can still define username/password with javascript (At least with D5).
Here's some javascript to clear username/password default value onFocus :
Don't forget to import your javascript file with..:
.. in template.php
Comment #6
mattcasey commentedf0nZ, I'm not sure why you set the input to 'textfield' during onBlur(), but on D6 this causes the password to be revealed after clicking away. The code still works when I just remove the line towards the bottom: