Look at the Api. You need to supply two hashed rather than one. The second has HTML options. The first is the URL
Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 2:49 PM, srj <[email protected]> wrote: > > I am using the form_tag_helper to create a form, but I want to give it > an ID so I can style the elements within the form. I currently have > the following: > > <% form_tag :controller => 'my_controller', :action => > 'my_action' do %> > <input class="actionButton" type="submit" value="Submit" /> > <% end %> > > I tried this: > > <% form_tag :id => 'xyz', :controller => > 'my_controller', :action => 'my_action' do %> > <input class="actionButton" type="submit" value="Submit" /> > <% end %> > > This compiles and runs ok with no errors, but it treats the ID= as a > parameter for my URL - not what I want. Is there a way to use > form_tag to generate HTML similar to this: > > <form id="xyz" action="/my_directory/my_action" > method="post"> > > Thanks, > > Steve J. > > --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

