Couple of ideas.
There have been some hacks about just appending fields from one SQLFORM 
with another.

I would recomend using SQLFORM.factory. You can add fields just using your 
model.

SQLFORM.factory(
db.table.name,
db.table.otherfield,
db.anothertable.anotherfield,
)


If you want it to be edit/insert form.
Prior to defining SQLFORM.factory change the defaults on those fields and 
in both cases manually:

db.table.name.default = db.table[request.args].name

form = SQLFORM.factory(
db.table.name,
db.table.otherfield,
db.anothertable.anotherfield,
) 

if form.process().accepted:
   //inserting or updating goeshere


W dniu środa, 29 sierpnia 2012 13:54:54 UTC+2 użytkownik Daniel Gonzalez 
napisał:
>
> Hi,
>
> I have two forms which I am creating using SQLFORM. I need two forms 
> because I want to style the presentation in such a way that the fields are 
> distributed across the page using a specific layout.
>
> I want both forms to be presented to the user as a single form, with only 
> one submit button.
>
> 1) Is it possible to do this?
> 2) Can both forms then be validated in one single controller function?
> 3) Can the data of both forms be submitted in one go?
>
> Thanks,
> Daniel
>

-- 



Reply via email to