Jeff.Corcoran
2009-Dec-16 05:16 UTC
Passing Parameters from one view to another using link_to
I am currently trying to populate hidden fields on a form based upon what values are present on the current form I am working on. For example, when I am viewing info for category with an id of 3 I have access to the parent_id of 2. If I click the new link, I want to populate the parent_id of 2 to a hidden field parent_id on the view. I can see how to add the query string no problem, how do I populate the hidden field. I have just done 2-3 hours of searching and can find nothing useful. I would think this would be a common issue. -- 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.
Craig White
2009-Dec-16 05:20 UTC
Re: Passing Parameters from one view to another using link_to
On Tue, 2009-12-15 at 21:16 -0800, Jeff.Corcoran wrote:> I am currently trying to populate hidden fields on a form based upon > what values are present on the current form I am working on. > > For example, when I am viewing info for category with an id of 3 I > have access to the parent_id of 2. If I click the new link, I want to > populate the parent_id of 2 to a hidden field parent_id on the view. I > can see how to add the query string no problem, how do I populate the > hidden field. I have just done 2-3 hours of searching and can find > nothing useful. I would think this would be a common issue.---- you could have saved yourself 2-3 hours of searching just by consulting rails api http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M001609 Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- 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.