%= form_tag search_action_url, method: :get, class: 'search-query-form', role: 'search' do %>
<%= render_hash_as_hidden_fields({f: {collection_sim: [@document.collection_name]}}) %>
<%= hidden_field_tag :search_field, search_fields.first.last %>
<%= hidden_field_tag :search_field, 'within_collection' %>
<%= text_field_tag :q, params[:q], class: 'search_q q form-control', id: 'q', autofocus: should_autofocus_on_search_box? %>
<% end %>