What about widgets? IS_IN_DB() for example. Is there a way to get those working with a regular FORM without using SQLFORM?
On Feb 10, 8:22 am, Bruno Rocha <[email protected]> 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

