> Sigh.. nothing works. I`ll abandone all this.
Hang in there a little longer.

If you want the user to first fill in 3 fields, then proceed to another 
form to fill out the rest of the fields it will look something like 
this:
(You got the first part working, and the 3 fields are submitted to the 
controller, right?)

the controller action that receives those parameters will need to render 
a new form, which are then submitted to a second controller action. you 
could use the same controller action for both steps, but lets use two 
for simplicity.

in the controller:
def register_1 #Receives the first 3 fields
  @user = User.new(params[:user])
  #Now register_1.html are rendered
end

register_1.html must now contain a form looking something like this:

<% form_for(@user, :url => {:action => 'register_2'}) do |form| %>
#Because the user is not saved in step 1, this form must contain hidden 
fields with the value of the fields from step_1
<%= form.hidden_field(:name) %> #etc
#Put the rest of the fields here, just like in the first form
<% end %>

The second controller action receives the complete user info and saves 
the user

def register_2
  @user = User.create(params[:user])
  #Maybe a flash and a redirect here
end

Rails uses the MVC architecture, so you need to learn how the models, 
controllers and views interact before you start getting the hang of it.
-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to