Just do def contact(): form=SQLFORM.factory(....) if form.accepts(....) return form # not dict(form=form)
and in layout.html {{=LOAD('default','contact')}} On Jun 18, 11:26 am, Julius Minka <j...@minka.sk> wrote: > I need a contact form (name, address,...) on every page of a web site. > Thinking about putting the form into layout.html and use some Ajax to > send entered values to be processed by a controller. I would like to > avoid page reload on form submission. > > I found 2 possible solutions in the archive: > 1.http://groups.google.com/group/web2py/browse_thread/thread/f162f35e4a... > Is this incomplete? How process function is called? > > 2.http://groups.google.com/group/web2py/browse_thread/thread/82fad17e26... > I ran application mentioned in the thread. This is probably close, but > complicated. > > What is good and simple approach to this issue? I do not have much > experience with Ajax. > > Thanks > Julius