1. Collections Component Guide
  2. Show password input (experimental)
  3. Disable form submit check
Show password input (experimental) example

Disable form submit check

The component sets the autocomplete attribute on the input to “off” so that browsers don’t remember the password. This isn’t reliable, so the component reverts the input type back to a password when its parent form is submitted. If this is causing conflicts with other JavaScript on your form, you can set disable-form-submit-check to true to disable this functionality and implement it yourself.

How it looks (preview)

How to call this example

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