Topic: form_tag issue

I am using the following template for a login form:

<div >
  <fieldset>
 

    <legend>Please Log In</legend>

    <% form_tag  do %>
      <p>
        <label for="name">Name:</label>
        <%= text_field_tag :name, params[:name] %>
      </p>

      <p>
        <label for="password">Password:</label>
        <%= password_field_tag :password, params[:password] %>
      </p>
 
      <p>
        <%= submit_tag "Login" %>
      </p>
    <% end %>

  </fieldset>
</div>



But the browser shows only

  Please Log In


What is wrong?

Thanks

Re: form_tag issue

Are you running Rails 1.2 or edge rails? If not, try the start/end form tag combo:

    <%= start_form_tag %>
      <p>
        <label for="name">Name:</label>
        <%= text_field_tag :name, params[:name] %>
      </p>

      <p>
        <label for="password">Password:</label>
        <%= password_field_tag :password, params[:password] %>
      </p>
 
      <p>
        <%= submit_tag "Login" %>
      </p>
    <%= end_form_tag %>

Railscasts - Free Ruby on Rails Screencasts