<html lang="pt-br" dir="ltr"><head></head><body>### [Disabling Browser Autocomplete for Form Fields](https://wpforms.com/developers/disable-browser-autocomplete-for-form-fields/)

**Published:** October 11, 2019
**Author:** Umair Majeed

**Excerpt:** In this tutorial, we're going to show you how to disable browser autocomplete on your form fields.

**Content:**

Want to prevent browsers from auto-filling your form fields? While browser autocomplete can be convenient, there are times when you need users to manually enter their information.

This guide will show you how to disable autocomplete functionality for specific forms or fields using PHP code snippets.

Before implementing autocomplete restrictions, it’s important to understand:

- Browser settings typically take precedence over HTML attributes and JavaScript
- The `autocomplete="off"` attribute signals your preference to browsers
- Modern browsers generally respect this setting, but some may override it
- Browser support varies (check the [MDN compatibility chart](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#browser_compatibility))

## Setting Up Your Form

First, you’ll need to create your form and add your form fields. If you need help with this, please review our guide on [creating your first form.](https://wpforms.com/docs/creating-first-form/ "How to Create Your First Form")

## Disabling Autocomplete

You can disable autocomplete either for an entire form or for specific fields. Here are both approaches:

#### Disable Autocomplete for All Fields in a Form

#### Disable Autocomplete for Specific Fields

The snippet below will specifically target the **Email** field. To target a different field type, the filter (`wpforms_field_properties_email`) would need to be adjusted.

Remember to update any of the snippets above to match your own form and field IDs. If you need help in finding these IDs, please check out our guide on[ finding form and field IDs.](https://wpforms.com/developers/how-to-locate-form-id-and-field-id/ "How to Locate Form ID and Field ID")

For background on the autocomplete attribute and approaches to turning it off, please see [MDN’s documentation](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion "MDN Documentation").

For background on the autocomplete attribute and approaches to turning it off, please see [Mozilla’s official documentation](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion).

And that’s all you need in order to disable the browser autocomplete for your WPForms. Next, would you like to disable the **Add Form** button on the classic editor? Try out our tutorial on [How to Remove “Add Form” button from TinyMCE editor](https://wpforms.com/developers/remove-add-form-button-from-tinymce-editor/ "How to Remove Add Form button from TinyMCE editor").

## Reference Filters

- [wpforms\_field\_properties](https://wpforms.com/developers/wpforms_field_properties/ "Using the wpforms_field_properties filter")
- [wpforms\_frontend\_form\_atts](https://wpforms.com/developers/wpforms_frontend_form_atts/ "Using the wpforms_frontend_form_atts filter")

**Categories:** Extending

**Tags:** PHP

---

</body></html>