diff --git a/app/views/form/page.html.erb b/app/views/form/page.html.erb
index d8ed5de0a..8385eaac7 100644
--- a/app/views/form/page.html.erb
+++ b/app/views/form/page.html.erb
@@ -1,3 +1,7 @@
+<% content_for :head do %>
+
+<% end %>
+
<% content_for :title, @page.header.present? ? @page.header : @page.questions.first().header.html_safe %>
<% content_for :before_content do %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 54da3536e..a12e64807 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -15,6 +15,10 @@
<%= favicon_link_tag asset_pack_path('media/images/govuk-apple-touch-icon-180x180.png'), rel: 'apple-touch-icon', type: 'image/png', size: '180x180' %>
<%= stylesheet_pack_tag 'application', media: 'all' %>
<%= javascript_pack_tag 'application', defer: true %>
+
+ <% if content_for?(:head) %>
+ <%= yield(:head) %>
+ <% end %>
<%= capybara_lockstep if defined?(Capybara::Lockstep) %>
<% if Rails.env.development? %>
diff --git a/app/webpacker/controllers/accessible_autocomplete_controller.js b/app/webpacker/controllers/accessible_autocomplete_controller.js
index 3cff0f4d1..02d67e55d 100644
--- a/app/webpacker/controllers/accessible_autocomplete_controller.js
+++ b/app/webpacker/controllers/accessible_autocomplete_controller.js
@@ -3,15 +3,11 @@ import accessibleAutocomplete from "accessible-autocomplete"
import 'accessible-autocomplete/dist/accessible-autocomplete.min.css'
export default class extends Controller {
- static values = { enhanced: Boolean, default: false }
connect() {
- if(!this.enhancedValue){
- accessibleAutocomplete.enhanceSelectElement({
- defaultValue: '',
- selectElement: this.element
- })
- this.enhancedValue = true
- }
+ accessibleAutocomplete.enhanceSelectElement({
+ defaultValue: '',
+ selectElement: this.element
+ })
}
}