Awesome! Glad you got it working. It’s always that placeholder that is usually giving the issue.
Just to let everybody know. If you change this line in your javascript code
input.setAttribute(‘autocomplete’, ‘off’)
to
input.setAttribute(‘autocomplete’, ‘nope’)
It will work to name, adress and zipcode input fields.
I found It on stackoverflow: html - Chrome ignores autocomplete="off" - Stack Overflow
Important to mention if your form is in a popup you must use the javascript code in the workflow that opens(shows) the popup.
@dev102 Hmm Make sure to run the code when the input is visible on the screen first. Can you share a screenshot of the code setup?
Hey @dev102
Thanks for the screenshots, that helps a lot. So instead of running a workflow, try adding it in an HTML element on the page with <script>
at the beginning and </script>
at the end. Make the element invisible on ‘page is loaded’. Then on a conditional, make it ‘visible’ when your input is visible on the screen.
Does that make sense? That might help to make sure the script doesn’t run too early.
Let me know if that helps.
@dev102 Hmm , I just tested it the original way that I set it up and it seems to work. It wasn’t working in an HTML element though. Here is the example to look at:
Preview: https://testapp42wcleandb.bubbleapps.io/version-test/autocomplete_off?debug_mode=true
If you want to disable autofill in Chrome for just one specific input, you need to use the ID Attribute that is at the very bottom of the properties editor. Type in a unique name for the ID Attribute for the input you want autocorrect disabled and then run this JS in the toolbox plug-in.:
const input = document.getElementById(‘UniqueNameEnteredInIDAttributeField’);
input.setAttribute(‘autocomplete’, ‘off’)
Be sure the input is visible when the JS runs. I had the input on a popup so I had to move the JS to run right after I showed the popup