I want to have a password field which says \"Password\" in it before a user enters their password (so they know what the field is)
I\'d rather just use Javascript, i
Add the following code to your javascript:
function makePasswordHidden() {
document.getElementById("password").setAttribute("type", "password");
}
Change the input for the password to:
What this does it it makes the input element a 'password' and the value is updated so that it is hidden. If you would like for the value="Password" to be visible if the field is left empty then add the following javascript function:
function makePasswordShown() {
document.getElementById("password").setAttrivute("type", "text");
}
And add the following to your password input:
onblur="if (this.value=='') makePasswordShown(); if (this.value=='') this.value='Password';"