<% content_for :before_content do %> <%= link_to 'Back', 'javascript:history.back()', class: "govuk-back-link" %> <% end %> <%= turbo_frame_tag "case_log_form", target: "_top" do %> <% if page_info["header"].present? %>

<%= page_info["header"] %>

<% end %> <%= form_with model: @case_log, method: "submit_form", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> <%= f.govuk_error_summary %> <% page_info["questions"].map do |question_key, question| %>
<%= display_question_key_div(page_info, question_key) %> > <%= render partial: "form/#{question["type"]}_question", locals: { question_key: question_key.to_sym, question: question, f: f } %>
<% end %> <%= f.hidden_field :previous_page, value: page_key %> <%= f.govuk_submit "Save and continue" %> <% end %> <% end %>