Skip to content

Commit 4193b4f

Browse files
author
Sasha Milenkovic
committed
docs: adds plugin example to add autofill preventative attributes, adds autofill section to docs
1 parent 88c748a commit 4193b4f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

essentials/examples.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ title: "Scroll to the first validation or error on the form."
127127
A plugin that automatically scrolls to the first error on the page on submit or when backend errors are added.
128128
::
129129

130+
::ExampleCard
131+
---
132+
href: "https://formkit.link/debcb256ce9bae22bc1c41e8c0ee0d9f"
133+
title: "Adds attributes to prevent autofill from password managers 1Password and LastPass"
134+
---
135+
A plugin that adds the attributes <code>data-1p-ignore</code> and <code>data-lpignore</code> to prevent autofill (you of course can add these yourself; this plugin automatically applies them to every email and password input).
136+
::
137+
130138
## Inputs
131139

132140
::ExampleCard

inputs/form.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,10 @@ label: "Node vs context"
491491
The node itself is not reactive and should be used for imperative actions like `node.submit()`. The context object is reactive and should be used for reading and reacting to the form’s state.
492492
::
493493

494+
## Autofill
495+
496+
In order to prevent password managers such as 1Password and LastPass from autofilling your email and password input fields, set the respective props `data-1p-ignore` and `data-lpignore` to `true` on the inputs themselves. If you would like for this to be done automatically, check out the [adds attributes to prevent autofill](/essentials/examples) plugin.
497+
494498
## Props & Attributes
495499

496500
Forms are technically considered `input` types — so they share many of the universal props that standard inputs use.

0 commit comments

Comments
 (0)