Thanks Bruno. That looks very promising.... I'm trying it out now :) I got mine working too but it's very amature.... dir to find what's there and add bits and pieces of them into the view. /sigh.
On Feb 10, 8:22 pm, Bruno Rocha <rochacbr...@gmail.com> wrote: > I almost always use forms in this following way: > > ################################################ > > *#Create a DIV to WRAP it all*>>> div = DIV(FORM()) > >>> print div > > <div><form action="" enctype="multipart/form-data" > method="post"></form></div> > > *#Take the elements of the wrapper using DOM*>>> print div.element('form') > > <form action="" enctype="multipart/form-data" method="post"></form> > > *#Create some other objects*>>> table = TABLE() > >>> table.append(TR(TD(INPUT(_type='text',requires=IS_NOT_EMPTY())))) > >>> print table > > <table><tr><td><input type="text" /></td></tr></table> > > *#Append other objects to the wrapper*>>> div.element('form').append(table) > >>> print div > > <div><form action="" enctype="multipart/form-data" > method="post"><table><tr><td><input type="text" > /></td></tr></table></form></div> > > *#validators works well*>>> > div.element('form').element(_type='text')['requires'] > > <gluon.validators.IS_NOT_EMPTY object at 0xa370f0c> > > ################################################ > > Note that it will work even if you want to use SQLFORM. > > -- > Bruno Rochahttp://about.me/rochacbruno/bio