Reputation: 1696
I have problems to add the id="my-form" to my form:
<tr>
<%= form_for([@patient, @patient.treatments.build], :id => "my_form") do |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 would you do that? I also tried:
<%= form_for, :id => "my_form"([@patient, @patient.treatments.build]) do |f|%>
Upvotes: 0
Views: 57
Reputation: 38645
Please try:
<%= form_for([@patient, @patient.treatments.build], :html => { :id => "my_form" }) do |f|%>
Upvotes: 2