phphtmlcsseditosclass

Edit box autofill does not clear placeholder


Basic HTML PHP CSS. I have an edit box with a placeholder. In the case that I have edited the fields once before (like username and password), and the browser has cached them, and I return to the form again (e.g., the login page), both the placeholder text and the auto filled values are appearing over top of each other. This is using the osclass code, if that matters. Clicking in the edit box removes the placeholder text, and the auto-filled value remains.

Thanks for the help!

Here's the site - letmeborrowthat

placeholder text and edit text both appearing


Solution

  • You should turn the autocomplete off in your code

    i.e.,

    <input id="email" type="text" name="email" value="" class="input-text" autocomplete="off">
    <input id="password" type="password" name="password" value="" class="input-text" autocomplete="off">
    

    You can read it from the mdn here