Bashing my head off this one, done some serious googling and can;t find an answer anywhere, is there any way to run multiple collection selects in single form, i have 1 working no problems, but when I try to set up a second I just get the same values as the first one stored, I think I need an array of some sort? But how? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thorsten
2007-Jul-26 20:34 UTC
Re: using more than 1 collection_select drop down in a form
if you use the select helper twice for the same object, both resulting dropdowns will have the same name attribute, and therefore the value in the params hash of one select will be overwritten by the other. you could create the select tag yourself, giving it a different name, and use options_from_collection_for_select to put the <options> inside. On 26 Jul., 22:26, Matt Daviss <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Bashing my head off this one, done some serious googling and can;t find > an answer anywhere, > > is there any way to run multiple collection selects in single form, i > have 1 working no problems, but when I try to set up a second I just get > the same values as the first one stored, I think I need an array of some > sort? But how? > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Matt Daviss
2007-Jul-26 20:40 UTC
Re: using more than 1 collection_select drop down in a form
Cheers for that, what I''m trying to do is create two records with a single subit, I have a model degree with a HABTM relationship with a model assigned, and what I want to be able to do is to create two assigneds on one form for a degree, so I think they need to have the same name, just not quite sure how to submit the data and then write it to seperate rows -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---