How to avoid listing previously entered values ​​in certain text fields of a form? HTML, PHP

In my HTML FORMS, when I focus on specific text fields, they list the history of previously entered values. Can this automatic dropout be avoided? I'm not looking for some tips on setting up a browser for my computer; instead, I want these settings for all users of my site to fill out a form.

Can these options also be applied only to some selected text fields? since historical values ​​for some text fields may be useful for a particular user using his / her car.

Maybe this can be achieved using Javascript, but there is no hint where to start.

Thank you for your help.

PS: I use PHP and Javascript (jQuery).

+3
source share
3 answers

Add an attribute autocomplete="off"to each of your form elements.

This is not part of the HTML W3C standard, but it works in both Mozilla browsers and IE.

+14
source

Try autocomplete = "off" in the tag <form>or <input>, see this Mozilla article , this MSDN page, and this Safari help page for more information. It seems that Safari has only documented the use of the attribute for individual tags <input>.

See also the answers to the question How can I prevent AutoFill from filling out Firefox?

+2
source

I think this is implemented in firefox using an internal table with field names and their history. You can try to create your own name for your fields (for example, "name-asdfg", and not just "name"), which leads to the removal of the form and processing overhead (you must remove the meaninglessness from the end of the name).

0
source

Source: https://habr.com/ru/post/1711497/


All Articles