Hello, I''m having a problem with radio_button, I don''t know what I''m doing wrong so please help me checking. I need the "user" to select the kind of report to load, The options are given with radio_buttons like this: <td>MES ACTUAL <%= radio_button ''tipo'',''mes'', {:checked => ''true''} %></td> <td>ANUAL <%= radio_button ''tipo'',''anual'', {:checked => ''true''} %></td> <td>ACUMULADO TOTAL <%= radio_button ''tipo'',''acumulado'',{:checked => 1}%></td> but they get loaded unchecked, if you check them, then you cant uncheck them, and that is not what I want. I just need the to work like simple radio_button that you can check or unchek, and having to choose only one. What is wrong? -- 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 -~----------~----~----~----~------~----~------~--~---
> What is wrong?I''m not sure that it''s radio buttons you need for this. Try ''check_box'' instead. Steve --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Never mind , I make it work,I change it to this: <td>MES ACTUAL <%= radio_button (''reporte'',''tipo'', ''mes'' ) %></td> <td>ANUAL <%= radio_button (''reporte'',''tipo'', ''anual'') %></td> <td>ACUMULADO TOTAL <%= radio_button (''reporte'',''tipo'',''acumulado'',:checked=>true)%></td> It seems that it needs to have the 2 first arguments name the same way to work as I needed. Thanks anyway -- 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 -~----------~----~----~----~------~----~------~--~---