2 changed files with 5 additions and 2 deletions
@ -1,10 +1,11 @@ |
|||||||
<%= answers = question.answer_options.map { |key, value| OpenStruct.new(id:key, name: value) } |
<%= answers = question.answer_options.map { |key, value| OpenStruct.new(id: key == "select" ? "" : value, name: value) } |
||||||
f.govuk_collection_select question.id.to_sym, |
f.govuk_collection_select question.id.to_sym, |
||||||
answers, |
answers, |
||||||
:name, |
:id, |
||||||
:name, |
:name, |
||||||
caption: caption && !page_header.present? ? { text: caption.html_safe, size: "l" } : nil, |
caption: caption && !page_header.present? ? { text: caption.html_safe, size: "l" } : nil, |
||||||
label: { text: question.header, size: !page_header.present? ? "l" : "m", tag: !page_header.present? ? "h1" : "h2" }, |
label: { text: question.header, size: !page_header.present? ? "l" : "m", tag: !page_header.present? ? "h1" : "h2" }, |
||||||
hint: { text: question.hint_text&.html_safe }, |
hint: { text: question.hint_text&.html_safe }, |
||||||
|
options: { disabled: ["select"] }, |
||||||
"data-controller": "accessible-autocomplete" |
"data-controller": "accessible-autocomplete" |
||||||
%> |
%> |
||||||
|
Loading…
Reference in new issue