right i understand colin what you mean, but u must have mis understood
my question-

My question is after the user hits submit, how can i transfer the
content for the fields in the form that he just filled out- into the
controller?

Do you understand?

FOr ex---

<% form_for @course do |f| %>
  <%= f.error_messages %>
  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label :subtitle %><br />
    <%= f.text_field :subtitle %>
  </p>
  <p>
    <%= f.label :body %><br />
    <%= f.text_area :body %>
  </p>

  <p><%= f.submit "Submit" %></p>
<% end %>

Now, for example i wrote the words "foo" for all of them.

In my Courses Controller, is there a way to pass the values of the
form fields into the controller?


On Apr 16, 4:39 pm, Colin Law <clan...@googlemail.com> wrote:
> On 16 April 2010 21:15, David Zhu <dzwestwindso...@gmail.com> wrote:
>
> > Is there anyway to send form fields that were just filled out (after
> > the user hits submit) and send those values to a contrller?
>
> How can the user fill out form fields after hitting submit?
>
> > Also, is
> > there a way to get the values of a certain field in a table and put
> > that into the contrller?
>
> Any input fields in a form (whether in a table or not) will be sent to
> the controller on submit, unless they are empty.  Try it and look in
> the log file (development.log) and you will see them in the params.
>
> Colin
>
> --
> 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 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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