<td><p align="right">Jul/10:</td> <td><%= select_tag "jul10", "<option>Y</option><option>N</option><option>R</option>" %></td> At the moment, my html form displays this combo box the way i want it, but it does not record down what the user has selected and save it to the database help please, thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Are you generating your form using form_for :foo ?, if so then you''d want something like this: <%= foo.select_tag :jul10, %w( Y N R ) %> Assuming jul10 is a member of the object you''re saving into (using update_attributes, or new(params[:foobar])). Does this help, if not, what does your controller method look like that is saving the record? Cheers, James On Nov 6, 2007 6:06 PM, xenophobicjojo <lonexenophobia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > <td><p align="right">Jul/10:</td> > <td><%= select_tag "jul10", > "<option>Y</option><option>N</option><option>R</option>" %></td> > > At the moment, my html form displays this combo box the way i want it, > but it does not record down what the user has selected and save it to > the database > > help please, > > thanks! > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
erm...i''m new to ruby =( don''t really understand what you said, so sorry but i''m not generating my form, i created this <create> form myself and replaced it in the _form.rhtml <td><p align="right">Jul/10:</td> <td><%= select_tag "jul10", "<option>Y</option><option>N</option><option>R</option>" %></td> produces the combo box but doesn''t actually save the value into my database when the user clicks create, everything else that the user types in other fields can be saved though. below is the whole _form.rhtml <p> <%= error_messages_for ''course'' %> </div> <!--[form:course]--> <table cellpadding="2"> <tr> <td><h3>Course Details:<h3></td> </tr> ... <tr> <td><h3>Presentation Details:</h3></td> </tr> <tr> <td><p align="right">Final Presentation (mmm yyyy):</p></td> <td align="left"><%= text_field "course", "final_presentation", :size=>"5" %></td> <td><p align="right">Presentation Pattern:</p></td> <td align="left"><%= text_field "course", "presentation_pattern", :size=>"30" %></td> </tr> <tr> <td><p align="right">Jan/08:</td> <td><%= select_tag "jan08", "<option>Y</option><option>N</ option><option>R</option>" %></td> <td><p align="right">Jul/08:</td> <td><%= select_tag "jul08", "<option>Y</option><option>N</ option><option>R</option>" %></td> </tr> ... </table> <!--[eoform:course]--> thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---