Anyone know how to stop your browser from autofilling forms? I’ve created a page where a user can update their info, address, phone, name etc. But when viewed safari auto populates some of the fields. I don’t want to turn it off for the browser itself as I do use the feature and I don’t want to have my users turn it off. So just trying to figure out how to stop this from happening. The yellow highlighted fields are whats being pre-populated by safari.
Also I only have safari so i’m assuming internet explorer, chrome, etc will do the same.
Ensure your form element has an ID attached to it called “form”
Ensure the form has been rendered on the screen when this script is run. Is the “form” visible when the page is loaded or is it revealed later or in a popup?
Try adding a # symbol before “form”. Ie $("#form")
thank you so much!
Not working now.
I think I know why: I had an issue with the autocomplete plugin and had to delay my search input display.
Any idea of another trigger to delay this script as well? Maybe when the #searchInput is visible / ready? let me dig my .Js haha
Yes. You can only work with an element via its ID after it becomes visible once. You got this! I often wait till an element is visible to run certain WFs
The dilemma: trying to select an element before it’s rendered. Two options I’d explore:
Not sure if this will work but try, at page load, selecting all inputs (assuming you don’t mind disabling autocomplete for all inputs?) jQuery ref. It might only work for rendered items so maybe no good, but worth a try.
+1 For a disable autocomplete option please. This is catching me out with address searches with the browser autocomplete showing over the google results