On 6 July 2010 12:20, Pale Horse <[email protected]> wrote: > Colin Law wrote: >> On 6 July 2010 12:00, Pale Horse <[email protected]> wrote: >>>> have got a form to display then work out how to get the list of >>>> functionality, testing and so on. Even if they do not seem to be >>> and mailer models and views for this in particular, would appear. >> >> You seem to have snipped the original question so I have had to go >> back to your initial email to see it, it is better not to snip so much >> that the basic problem is lost. >> >> You say you already have the form showing the list of products and >> quantities. When you submit that form then the contents of the fields >> will be passed in params[]. In the controller you can then pick up >> the quantities. I am not sure exactly what you are having >> difficulties with. >> >> Colin > > Example (this is one of the fields in the form. Others are being passed > fine. I understand that on submit, the contents of the parameters are > passed and we can then render those in the view appropriately): > > <p> > <label for="order_products">Products</label> > <% for products in Product.all(:conditions => "display=1") %> > <%= products.name %> <%= text_field :order, :product_quantity %> > <% end %> > </p> > > Obviously, the about renders a text field for each Product where the > user can enter the quantity the require opposite a Product name label.
Is that inside a form_tag? It should be text_field_tag I think. 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

