Form checkboxes example
Checkbox items with error
How it looks
(preview)
How to call this example
<%= render "govuk_publishing_components/components/checkboxes", {
name: "nationality[]",
heading: "What is your nationality?",
error: "Select if you are British, Irish or a citizen of a different country",
hint_text: "If you have dual nationality, select all options that are relevant to you.",
items: [
{
label: "British",
value: "british",
hint: "including English, Scottish, Welsh and Northern Irish"
},
{
label: "Irish",
value: "irish"
},
{
label: "Other",
value: "other"
}
]
} %>