[web2py] Re: Create SQLFORM having one submit button for 2 distinct tables

2016-05-23 Thread Mohit Jain
Thanks Anthony for your suggestion! Works just fine :) For anyone looking at a similar problem, here's what I've done now. form = SQLFORM.factory( Field('appStart','datetime',label='App-Period Start Time'), Field('appEnd','datetime',label='App-Period End Time')

[web2py] Re: Create SQLFORM having one submit button for 2 distinct tables

2016-05-22 Thread Anthony
It's an extra hassle to have multiple fields with the same name in a given form because you get back a list for each common name. Instead, you're better off just creating a custom form via SQLFORM.factory, naming each field uniquely. Then do the inserts with the form.vars values after validatio