No, you should *not* give each form a unique name. Instead, use the code I provided (though without specifying the "hidden" argument to SQLFORM, as you will insert the hidden "id" field for each record's form directly in the view). So, in the controller, you define only a single form with an explicit name (e.g., "update"). In the view, you create a separate form for each row of your table (as you are already doing), but you use the formname and formkey from the single form created in the controller -- this will work because only one of these forms will be submitted on any give request. The only unique item in each form should be a hidden "id" field with the id of the record in that row. This method requires only one form in the controller and only a single database select for the records (done *after* the form processing, in order to capture any record updates).
Anthony On Friday, September 18, 2015 at 1:33:53 AM UTC-4, Alfonso Serra wrote: > > Hi Anthony. ye ive tried, tricked the view so it has unique form names but > on submission, if i call process, it wont pass validation. Im probably doin > it wrong but ive manage to get it working. > > Ive decided to make a video out of this, so i can explain the problems im > having and how did i solve them. > > https://vimeo.com/139667814 > > Thanks everyone. > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.