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,
This is the form:
<% form_for :ticket, @ticket, :url => { :controller => 'provider/tickets', :action => 'create'}, :html => { :id => "new_ticket", :multipart => true } do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :Regarding %><br />
<%= f.text_field :title %>
<%= hidden_field_tag :general_comments, '', :id => "general_comments" %>
<%= hidden_field_tag :resident_id, @resident.id %>
<%= hidden_field_tag :send_type, 'everyone', :id => "send_type" %>
<%= hidden_field_tag :email, true, :id => "email_value" %>
<% @categories.each do |category_comments_|%>
<%= hidden_field_tag "category_comments_" + category_comments_.id.to_s , '', :id => "category_comments_" + category_comments_.id.to_s %>
<% end %>
</p>
<%= f.submit 'Create' %>
</p>
<% end %>
I am updating the hidden_field_tag through javascript and it is getting assigned with values when I look in the browser,
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.
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.
The values inside this loop is only not submitting properly,
<% @categories.each do |category_comments_|%>
<%= hidden_field_tag "category_comments_" + category_comments_.id.to_s , '', :id => "category_comments_" + category_comments_.id.to_s %>
<% end %>
Since the app is too old, the version is Ruby 1.8.7 and Rails 2.3. Can anyone help me to solve this.
Thanks.

