Is there any way to have one drop-down collection dependent on another
within a form? E.g.
<% form_for @lab, :html => { :multipart => true } do |f| %>
<td><%= f.collection_select :lab_desc_id,
LabDesc.find_main, :id, :name %></td>
<td><%= f.collection_select :unit_id,
LabDesc.units( ??? ), :id, :units %></td>
<% end %>
So that ??? "knows" the id that was chosen in the first
collection_select?
Many TIA,
Craig
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment