Select with search (experimental) example
With different id and name
If no name is provided, name defaults to the (required) value of id.
How it looks (preview)
How to call this example
<%= render "govuk_publishing_components/components/select_with_search", {
id: "dropdown-with-different-id-and-name",
label: "My Dropdown",
name: "dropdown[1]",
options: [
{
text: "Option one",
value: "option1"
},
{
text: "Option two",
value: "option2"
}
]
} %>