Is there anyway to send form fields that were just filled out (after the user hits submit) and send those values to a contrller? Also, is there a way to get the values of a certain field in a table and put that into the contrller? How would i do that? Thanks :) -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 16 April 2010 21:15, David Zhu <dzwestwindsor45-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 16 April 2010 21:15, David Zhu <dzwestwindso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 16 April 2010 23:11, David Zhu <dzwestwindsor45-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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?As I stated in my previous mail all input field values are available to the controller in the params array. I think you may benefit from working through the rails guides at http://guides.rubyonrails.org/. Start with Getting Started obviously. By the way, when replying could you insert your reply at appropriate point in previous email rather than at the top, it makes it easier to follow the thread. Colin> > > On Apr 16, 4:39 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 16 April 2010 21:15, David Zhu <dzwestwindso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
wait what am I doing wrong with my posting? On Apr 17, 3:58 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 16 April 2010 23:11,DavidZhu<dzwestwindso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > 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? > > As I stated in my previous mail all input field values are available > to the controller in the params array. I think you may benefit from > working through the rails guides athttp://guides.rubyonrails.org/. > Start with Getting Started obviously. > > By the way, when replying could you insert your reply at appropriate > point in previous email rather than at the top, it makes it easier to > follow the thread. > > Colin > > > > > > > On Apr 16, 4:39 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> On 16 April 2010 21:15,DavidZhu<dzwestwindso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. > >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 18 April 2010 02:55, David Zhu <dzwestwindsor45-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> wait what am I doing wrong with my posting?Are you talking about POST in rails, or email posting here? If the email then it is best to insert your reply into the previous email as I have here (after your question), rather than at the top of the mail. This makes it easier to follow the thread. 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I think he means how he can specify where the request is going to go. The form_for takes an :url paramter that lets you set the destination of the request. <% form_for @course, :url => {:controller => ''my_controller'', :action => ''my_action'', :id => ''my_id''} do |f| %> On Apr 18, 10:13 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 18 April 2010 02:55, David Zhu <dzwestwindso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > wait what am I doing wrong with my posting? > > Are you talking about POST in rails, or email posting here? If the > email then it is best to insert your reply into the previous email as > I have here (after your question), rather than at the top of the mail. > This makes it easier to follow the thread. > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Wait colin, I''m just hitting "Reply" at the bottom of the page. Isn''t that what I''m supposed to do? I''m pretty sure everything is in chronological order as welll... what exactly do you mean? On Apr 19, 3:38 am, Sharagoz <shara...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I think he means how he can specify where the request is going to go. > The form_for takes an :url paramter that lets you set the destination > of the request. > > <% form_for @course, :url => {:controller => ''my_controller'', :action > => ''my_action'', :id => ''my_id''} do |f| %> > > On Apr 18, 10:13 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > > On 18 April 2010 02:55, David Zhu <dzwestwindso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > wait what am I doing wrong with my posting? > > > Are you talking about POST in rails, or email posting here? If the > > email then it is best to insert your reply into the previous email as > > I have here (after your question), rather than at the top of the mail. > > This makes it easier to follow the thread. > > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
David Zhu wrote:> Wait colin, I''m just hitting "Reply" at the bottom of the page. Isn''t > that what I''m supposed to do?Yes, but then type your reply *after* the relevant lines in the quoted text (as I''m doing here). This is the order in which you''d have a conversation. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.