title: Hidden_field_tag values are missing during submission of a form_for form
body: <p>I am having a form using form_for helper, In this form I have included some hidden_field_tags which I am updating through javascript,</p>
  
  <p>This is the form:</p>
  
  <pre><code> &lt;% form_for :ticket, @ticket, :url =&gt; { :controller =&gt; 'provider/tickets', :action =&gt; 'create'}, :html =&gt; { :id =&gt; "new_ticket", :multipart =&gt; true } do |f| %&gt;
   &lt;%= f.error_messages %&gt;
   &lt;p&gt;
    &lt;%= f.label :Regarding %&gt;&lt;br /&gt;
    &lt;%= f.text_field :title %&gt;
    &lt;%= hidden_field_tag :general_comments, '', :id =&gt; "general_comments" %&gt;
    &lt;%= hidden_field_tag :resident_id, @resident.id %&gt;
    &lt;%= hidden_field_tag :send_type, 'everyone', :id =&gt; "send_type" %&gt;
    &lt;%= hidden_field_tag :email, true, :id =&gt; "email_value" %&gt;
    &lt;% @categories.each do |category_comments_|%&gt;
    &lt;%= hidden_field_tag "category_comments_" + category_comments_.id.to_s , '', :id =&gt; "category_comments_" + category_comments_.id.to_s %&gt; 
   &lt;% end %&gt;
   &lt;/p&gt;
   &lt;%= f.submit 'Create' %&gt;
   &lt;/p&gt;
   &lt;% end %&gt;
  </code></pre>
  
  <p>I am updating the hidden_field_tag through javascript and it is getting assigned with values when I look in the browser,</p>
  
  <p><a href="https://i.stack.imgur.com/jhdjc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jhdjc.png" alt="Value got assigned to the hidden values"></a></p>
  
  <p>But if I submit the form the params of this hidden_field_tag are empty, I dono why this is happening, please check the below screenshot to see the empty parameter while submitting.</p>
  
  <p><a href="https://i.stack.imgur.com/cBw49.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cBw49.png" alt="enter image description here"></a></p>
  
  <p>But if I use the same fields in form_tag it is working fine, if i use it in form_for it is not working. </p>
  
  <p>The values inside this loop is only not submitting properly,</p>
  
  <pre><code>   &lt;% @categories.each do |category_comments_|%&gt;
      &lt;%= hidden_field_tag "category_comments_" + category_comments_.id.to_s , '', :id =&gt; "category_comments_" + category_comments_.id.to_s %&gt; 
     &lt;% end %&gt;
  </code></pre>
  
  <p>Since the app is too old, the version is Ruby 1.8.7 and Rails 2.3. Can anyone help me to solve this.</p>
  
  <p>Thanks.</p>