Can I pass additional parameters when using a submit_tag? Is this legal? <%= submit_tag ''Save'' , { :editfacility => params["editfacility"] } %> When I do this, the "editfacility" parameter is always lost. I have a feeling I''m missing something basic... Thanks, Marcus -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060522/1cedb39e/attachment.html
Marcus Blankenship wrote:> Can I pass additional parameters when using a submit_tag? > > Is this legal? > > <%= submit_tag ''Save'' , { :editfacility => params["editfacility"] } > %> > > > When I do this, the "editfacility" parameter is always lost. I have a > feeling I''m missing something basic... > > Thanks, > MarcusYou want a hidden_field, submit button only submits the form. -- Posted via http://www.ruby-forum.com/.
Thanks! -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Alex Wayne Sent: Monday, May 22, 2006 3:56 PM To: rails@lists.rubyonrails.org Subject: [Rails] Re: Submit_tag question Marcus Blankenship wrote:> Can I pass additional parameters when using a submit_tag? > > Is this legal? > > <%= submit_tag ''Save'' , { :editfacility => params["editfacility"]> } %> > > > When I do this, the "editfacility" parameter is always lost. I have a> feeling I''m missing something basic... > > Thanks, > MarcusYou want a hidden_field, submit button only submits the form. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails