1. Component Guide
  2. Form radio button
  3. With error items on form group
Form radio button example

With error items on form group

How it looks (preview)

How do you want to sign in?

Error: Descriptive link to the question with an error 1
Descriptive link to the question with an error 2

How to call this example

<%= render "govuk_publishing_components/components/radio", {
  heading: "How do you want to sign in?",
  name: "radio-group-error",
  id_prefix: "error",
  error_items: [
    {
      text: "Descriptive link to the question with an error 1",
      href: "#example-error-1"
    },
    {
      text: "Descriptive link to the question with an error 2",
      href: "#example-error-2"
    }
  ],
  items: [
    {
      value: "government-gateway",
      text: "Use Government Gateway"
    },
    {
      value: "govuk-verify",
      text: "Use GOV.UK Verify"
    }
  ]
} %>