21

Hi all you all have experienced that when you use atextbox again and again by writing something in it and submitting the values the textbox starts to give you suggestion on the onfocus event based on previous written values. Can we disable this attribute of the textbox that it shouldn't suggest previous values?

Awais Qarni
  • 17,492
  • 24
  • 75
  • 137
  • Possible duplicate, please see this post: [http://stackoverflow.com/...disallow-web-browser-autocomplete](http://stackoverflow.com/questions/893799/can-i-disallow-web-browser-autocomplete) for a detailed discussion. – James Hill Jun 01 '11 at 17:54

2 Answers2

94

autocomplete="off" add this as attribute to your control e.g.

<input type="text" autocomplete="off" />
Senad Meškin
  • 13,597
  • 4
  • 37
  • 55
  • Even it's implemented on a single textbox; It disables all the textboxes in the form, not able to type in any of my text boxes. – Vikrant Oct 03 '19 at 10:53
  • Autocomplete attribute is toggling autocomplete inside text box. This attribute is not responsible for the status of the text box. So, if autocomplete is off or on your text box will be enabled. Check if your form is disabled. – Senad Meškin Oct 03 '19 at 10:59
  • Yes, it was the attribute in form tag. Thanks for help – Vikrant Oct 03 '19 at 11:06
6

You can try this code

<input autocomplete="nope" name="clent_email" id="clent_email" type="text">

change autocomplete="off" to autocomplete="nope"

Manu Joseph
  • 389
  • 4
  • 10