Select with search (experimental) example
With error
An arbitrary number of separate error items can be passed to the component.
How it looks (preview)
How to call this example
<%= render "govuk_publishing_components/components/select_with_search", {
id: "dropdown-with-error",
label: "How will you be travelling to the conference?",
error_items: [
{
text: "Please choose an option"
}
],
include_blank: true,
options: [
{
text: "Public transport",
value: "option1"
},
{
text: "Will make own arrangements",
value: "option2"
}
]
} %>