I have a form for users to select from a set of files they''d like to download (all, by default), set up something like this: <%= start_form_tag(:action => "download") %> <table class="download"> <tr><td> <% @file_types.each do |ft| %> <input name="file_type[<%=ft%>]" id="file_type[<%=ft%>]" type="checkbox" value="1" checked/> <b><%= ft %> files</b>.<br> <% end %> </td></tr> </table> <%= end_form_tag %><br> <%= submit_tag("Download") %> Unfortunately, clicking on the "Download" button does nothing. Changing the action doesn''t make any difference.I''ve used similar code with other forms on the site and they work, so the fault must be in the code above. Can anyone suggest what the problem could be with it? Thanks. -- 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 -~----------~----~----~----~------~----~------~--~---
can you try to switch those two lines ? <%= end_form_tag %><br> <%= submit_tag("Download") %> to <%= submit_tag("Download") %> <%= end_form_tag %><br> your submit butto has something like a context, the form. Marcel On 25 Mai, 11:36, Milo Thurston <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have a form for users to select from a set of files they''d like to > download (all, by default), set up something like this: > > <%= start_form_tag(:action => "download") %> > <table class="download"> > <tr><td> > <% @file_types.each do |ft| %> > <input name="file_type[<%=ft%>]" id="file_type[<%=ft%>]" > type="checkbox" value="1" checked/> <b><%= ft %> files</b>.<br> > <% end %> > </td></tr> > </table> > <%= end_form_tag %><br> > <%= submit_tag("Download") %> > > Unfortunately, clicking on the "Download" button does nothing. Changing > the action doesn''t make any difference.I''ve used similar code with other > forms on the site and they work, so the fault must be in the code above. > Can anyone suggest what the problem could be with it? > Thanks. > > -- > 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 -~----------~----~----~----~------~----~------~--~---
lanzm wrote:> <%= end_form_tag %><br> > <%= submit_tag("Download") %> > > to > > <%= submit_tag("Download") %> > <%= end_form_tag %><br>That works, thanks. Strange, as I didn''t encounter the problem elsewhere. -- 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 -~----------~----~----~----~------~----~------~--~---