Dudebot wrote:> 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
I''m pretty sure that the last time this question was asked, the answer
was "Javascript". Let the answer to the first one do an AJAX load of
the
second one.
--
Posted via http://www.ruby-forum.com/.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.