<% form_tag :action => "login", :html_options => {:onClick => "return validate_form(this)"} do %> Login: <br/><%= text_field_tag :name %><br/> Password: <br/><%= password_field_tag :password %><br /><br/> <%= submit_tag "SignIn" %> <% end %> <%= link_to 'SignUp', :action => 'signup' %> <%= link_to 'Forgot Password', :action => 'forgot_password' %>
I wrote the above syntx for validation..using javascript the validation is not happening.
form_for understands what you mean when you do :html_options => ..., but form_tag expects you to pass 2 option hashes: the first containing routing options, the second containing html options. Also, do you really want onClick rather than onSubmit ?
Fred