0

I want to remove input suggestions in HTML. The solution can be JavaScript! I do not know the syntax. To more comprehension of the problem, take a look in the following image:

Remove input suggestions in HTML.

I've already searched about this question and what I found was autocomplete="off", but I think it was not enough yet, because the problem wasn't resolved.

The code:

<input name="productQuantity" maxlength="2" type="text" autocomplete="off" />
tckmn
  • 52,184
  • 22
  • 101
  • 145
Guilherme Oderdenge
  • 4,580
  • 5
  • 52
  • 88

1 Answers1

5

The most common trick to remove it is to put the random "name" of field for example "firstname-randomstringhere" and then substract this random string in php.

You should include in your question what have you tried by the way.

This random string may be also generated once and be stored in $_SESSION.

Robert
  • 17,808
  • 4
  • 50
  • 79
  • I just have tried `autocomplete="off"`. I don't said before, but I'm using C#.Net. I can't believe that server-side may be compromising, but your suggestion about the session is valid — because I'm using it. – Guilherme Oderdenge Jul 11 '13 at 12:38
  • Let me ask, Robert. Should I use a random and safe name to my input or just different of the session name is enough? – Guilherme Oderdenge Jul 11 '13 at 12:51
  • it's all about the random name within one session of use. It doesn't matter if you use session for it or you don't. Using session has one adventage - the random string is generated once therefore function is called once. – Robert Jul 11 '13 at 12:56
  • Oh, got it! Thank you about the explanation. Now is with me. – Guilherme Oderdenge Jul 11 '13 at 13:01