[web2py] Re: Two tables, one form -- with a twist

2013-08-19 Thread Anthony
On Sunday, August 18, 2013 10:21:51 PM UTC-7, Joe Barnhart wrote: > Ah. That explains one mystery. I knew about setting the formname in the > SQLFORM call, but I had not noticed I needed to pass it in the "validate" > method as well. > SQLFORM.__init__ does not take a "formname" argument (you

[web2py] Re: Two tables, one form -- with a twist

2013-08-18 Thread Joe Barnhart
Ah. That explains one mystery. I knew about setting the formname in the SQLFORM call, but I had not noticed I needed to pass it in the "validate" method as well. I think perhaps Niphlod is right in that I should look towards SQLFORM.factory since this seems to be trending away from the averag

[web2py] Re: Two tables, one form -- with a twist

2013-08-18 Thread Anthony
Also, as a general note, the automatic form names will be different for create vs. update forms, but you can control that by specifying your own form name via the "formname" argument to accepts/validate/process. Anthony On Sunday, August 18, 2013 6:06:20 PM UTC-7, Niphlod wrote: > > Given that

[web2py] Re: Two tables, one form -- with a twist

2013-08-18 Thread Niphlod
Given that you are pretty down the line of deciding what table needs to be "touched", you should just write a wrapper that either inserts a record on work_table and let the users edit it or that it copies the values from the ro_table to the work_table as defaults, and then prepare a "prefilled"