Re: [web2py] Several controllers inserting and updating one row via forms

2013-08-30 Thread Vinicius Assef
Because if the hidden id field is in your request.post_vars, the record's new data was submitted. On Fri, Aug 30, 2013 at 10:43 AM, Denis Sh wrote: > Hm, I thought that form = SQLFORM(db.person, record) , i.e. parameter > 'record' indicates that, so why duplicate that in view? > > > On Fri, Aug 3

Re: [web2py] Several controllers inserting and updating one row via forms

2013-08-30 Thread Denis Sh
Hm, I thought that form = SQLFORM(db.person, record) , i.e. parameter 'record' indicates that, so why duplicate that in view? On Fri, Aug 30, 2013 at 3:43 PM, Vinicius Assef wrote: > Because SQLFORM uses this field to know you're editing not inserting a > record. > > On Fri, Aug 30, 2013 at 5:27

Re: [web2py] Several controllers inserting and updating one row via forms

2013-08-30 Thread Vinicius Assef
Because SQLFORM uses this field to know you're editing not inserting a record. On Fri, Aug 30, 2013 at 5:27 AM, wrote: > Thanks, I indeed missed that hidden field with record id. From the book: > "Edit forms also contain a hidden INPUT field with name="id" which is used > to identify the record.

Re: [web2py] Several controllers inserting and updating one row via forms

2013-08-30 Thread shapovalovdenis
Thanks, I indeed missed that hidden field with record id. From the book: "Edit forms also contain a hidden INPUT field with name="id" which is used to identify the record. " Though I don't really understand why we need that field as record id is kept server-side anyway. On Thursday, August 29,

Re: [web2py] Several controllers inserting and updating one row via forms

2013-08-29 Thread Vinicius Assef
It would be nice if you show your view. Probably you're missing a hidden field in second form with the record id. On Thu, Aug 29, 2013 at 10:12 AM, wrote: > Hi! > > I have an issue with UPDATE form. I'm trying to implement something like > enrollment form that has man field beyond standard name