From 21059b4b31346d9253be27c2297716bbdf5d4710 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Thu, 6 Aug 2020 09:15:51 -0500 Subject: [PATCH] Add Disable Auto-Completion For A Form Input as an html til --- README.md | 3 ++- ...disable-auto-completion-for-a-form-input.md | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 html/disable-auto-completion-for-a-form-input.md diff --git a/README.md b/README.md index 18e99ef..d3d3c1e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ and pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud). -_941 TILs and counting..._ +_942 TILs and counting..._ --- @@ -283,6 +283,7 @@ _941 TILs and counting..._ ### HTML - [Adding Alt Text To An Image](html/adding-alt-text-to-an-image.md) +- [Disable Auto-Completion For A Form Input](html/disable-auto-completion-for-a-form-input.md) - [Render Text As Superscript](html/render-text-as-superscript.md) - [Submit A Form With A Button Outside The Form](html/submit-a-form-with-a-button-outside-the-form.md) diff --git a/html/disable-auto-completion-for-a-form-input.md b/html/disable-auto-completion-for-a-form-input.md new file mode 100644 index 0000000..bf83551 --- /dev/null +++ b/html/disable-auto-completion-for-a-form-input.md @@ -0,0 +1,18 @@ +# Disable Auto-Completion For A Form Input + +The browser wants to be helpful by making informed suggestions about what +should be auto-filled into form inputs. + +We may not want this behavior. It could be a source of data entry mistakes, an +annoyance, or just not something we want our users to experience. + +We can turn this off at an individual field level with the `autocomplete` +attribute: + +```html + +``` + +Note: It is `off` and not something like `false`. + +[source](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion)