38

On my HTML page I have multiple text inputs. Every time I enter values in them, it shows me the previously entered values. Is it due to a browser property or HTML? How do I disable it?

5 Answers 5

56

Always the better appraoch is to give form autocomplete="off"

<form autocomplete="off">

<input type="text" id="text1">
<input type="text" id="text2">

</form>

Then only newer versions of Eclipse support HTML5 tags such as autocomplete else it will show warning...

0
28

Just set the autocomplete property of your textboxes to off. Like this...

<input type="email" name="email" autocomplete="off">
10
  • i tried that, it says "Undefined attribute name (autocomplete)" Jul 23, 2013 at 6:19
  • which browser are you using ?
    – mohkhan
    Jul 23, 2013 at 6:20
  • chrome/firefox/ie testing on all of them as I want it to work on all known bowers Jul 23, 2013 at 6:22
  • 1
    @AdityaPonkshe to clear things up, are you getting this "Undefined attribute name (autocomplete)" in your browser or developement environment? Because googling such error directs me to eclipse problems.
    – Ilu
    Jul 23, 2013 at 6:24
  • 1
    @AdityaPonkshe Yeah my bad, answered the same moment I guess :) There seems to be workarounds for such problems. Not too familiar with the eclipse, but worth a try: stackoverflow.com/questions/4193905/… (just because it's annoying to see warnings)
    – Ilu
    Jul 23, 2013 at 6:28
4

That solution helped me: if you are using google Chrome, try this: Put the mouse pointer on the entry that you want to delete, press Delete. If the entry is not removed, press Shift+Delete.

3

i think it is related to this question autocomplete

try to used javascript to add attribute autocomplete to your form

someForm.setAttribute( "autocomplete", "off" ); someFormElm.setAttribute( "autocomplete", "off" );
0

just try this lines below

$('input').each(function(k,v){
   $(v).val(''); 
});

works fine with me

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.