1. Collections Component Guide
  2. Show password input (experimental)
  3. Set autocomplete attribute
Show password input (experimental) example

Set autocomplete attribute

By default, autocomplete is set to off. This can be set to new-password or current-password to help browsers differentiate between new and current passwords.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/show_password", {
  label: {
    text: "Please enter your password"
  },
  autocomplete: "current-password",
  value: "this is my password"
} %>