Add id to form, rails -
i have problems add id="my-form" form:
<tr> <%= form_for([@patient, @patient.treatments.build], :id => "my_form") |f|%> <th><%= f.collection_select :category_id, category.find(:all), :id, :typ %></th> <th><%= f.text_field :content , :id => "inputbox"%></th> <th><%= f.text_field :day, :value => date.today %></th> <th><%= f.submit :class => 'btn btn-small btn-primary searsa'%></th> <% end %> </tr>
how that? tried:
<%= form_for, :id => "my_form"([@patient, @patient.treatments.build]) |f|%>
please try:
<%= form_for([@patient, @patient.treatments.build], :html => { :id => "my_form" }) |f|%>
Comments
Post a Comment