-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathview.html.erb
More file actions
18 lines (17 loc) · 817 Bytes
/
view.html.erb
File metadata and controls
18 lines (17 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<% if question.autocomplete_component? %>
<%= render DfE::Autocomplete::View.new(
form_builder,
attribute_name: :selection,
form_field: form_builder.govuk_collection_select(:selection,
question.selection_options_with_none_of_the_above,
:name,
:name,
options: { prompt: t("autocomplete.prompt") },
label: { text: question_text_with_extra_suffix, **question_text_size_and_tag },
hint: { text: question.hint_text }
),
)%>
<%= helpers.init_autocomplete_script %>
<% else %>
<%= selection_html %>
<% end %>