title: Rails form_tag, adding a hidden field
body: <p>I have a <code>form_tag</code> that takes a code as input:</p>
  
  <pre><code>= form_tag({controller: "charges", action: "new"}, method: "get") do
    = label_tag(:code, "Check code:")
    = text_field_tag(:code)
    = hidden_field :item,  value: @item.id
    = submit_tag("Search")
  </code></pre>
  
  <p>I want to have a hidden field that adds a certain value to the URL. I basically want to create the URL <code>example.com/charges/new?item=1&amp;code=mycode</code> where '1' is the item id and 'mycode' is the code entered by the user, but I can't get it to work.</p>