1. Collections Component Guide
  2. Form radio button
  3. With error and hint on form group
Form radio button example

With error and hint on form group

How it looks (preview)

Choose the option that suits
Error: Please select one option

How to call this example

<%= render "govuk_publishing_components/components/radio", {
  name: "radio-group-error",
  id_prefix: "error",
  error_message: "Please select one option",
  hint: "Choose the option that suits",
  items: [
    {
      value: "government-gateway",
      text: "Use Government Gateway"
    },
    {
      value: "govuk-verify",
      text: "Use GOV.UK Verify"
    }
  ]
} %>