- Add
autocomplete="off"
onto<form>
element; - Add hidden
<input>
withautocomplete="false"
as a first children element of the form.
<form autocomplete="off" method="post" action="">
<input autocomplete="false" name="hidden" type="text" style="display:none;">
...
This formation is going to prevent Chrome and Firefox to offer autofill and autocomplete for all input fields inside the form.
Just wanted to chime in here for those of you who want to remove the email autofill as well;
Create an SVG for your Email label text instead of using actual text.
Change the label to 'Nope' and basically just hide it with z-index and absolute positioning.
Set Input type, name and autoComplete to 'Nope'.
This works for me in my React project, testing on the latest Chrome browser.