How can I disable autocomplete on a form input in Webflow? I've tried using the "autocomplete" attribute with values of "off" and "false", but it hasn't worked. Any suggestions?

TL;DR
  • Set autocomplete="off" in Custom Attributes for each input field.  
  • Add hidden dummy inputs before your form fields to confuse autofill.  
  • Inject JavaScript via Page Settings to set autocomplete="off" on the form tag.  
  • Rename input field names to non-standard values to prevent browser overrides.

Disabling autocomplete in Webflow form inputs can be tricky due to how browsers (especially Chrome) override form settings. Here's how to properly implement it in Webflow:

1. Set Autocomplete Attribute in Webflow

  • Select the Input Field you want to modify.
  • In the Element Settings Panel, scroll to Custom Attributes.
  • Add a new attribute:
  • Nameautocomplete
  • Valueoff (not false)
  • This works for most fields, but some browsers may still override it for commonly used fields like email or name.

2. Add Hidden Dummy Fields (Workaround)

  • Browsers often ignore autocomplete="off" if they suspect the form might contain sensitive or frequently autofilled data.
  • Add two dummy input fields before your actual form fields:
  • For example: one text and one password type input.
  • Set their display to none via Custom Code or add a class in Webflow and apply display: none.
  • These confuse autofill mechanisms.

3. Use Webflow Embed to Add autocomplete="off" to the Form Tag

Webflow’s Designer doesn’t allow editing the <form> tag directly. To fix this:

  • Go to Page Settings > Before </body> tag section.
  • Add JavaScript to disable autocomplete globally:

<script>
  document.addEventListener("DOMContentLoaded", function () {
    const forms = document.querySelectorAll('form');
    forms.forEach(form => {
      form.setAttribute('autocomplete', 'off');
    });
  });
</script>

  • This enforces the setting on the entire form.

4. Double-Check Field Names

  • Avoid commonly autofilled field name values, such as:
  • "email""name""password"—browsers may trigger auto-fill regardless of the autocomplete attribute.
  • Instead, use alternate names like:
  • "useremailfake""formname_input".

Summary

To effectively disable autocomplete in Webflow, set autocomplete="off" via Custom Attributes on inputs, inject a script to apply it on the form tag, and optionally add hidden dummy fields to trick browser autofill. Also, use unconventional field names to avoid triggering autocomplete behavior.

Rate this answer

Other Webflow Questions