You might consider creating a custom formstyle function, modeled after this one <https://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#718>, but without including the labels. You could then do SQLFORM(..., formstyle=myformstyle), or if you want it to apply to all forms in the app, somewhere in a model you could do SQLFORM.formstyles.table3cols = myformstyle. The table3cols formstyle is the default, so by changing the function associated with it, you will change the default.
Anthony On Wednesday, March 20, 2013 10:30:44 AM UTC-4, carlo wrote: > > Thank you Richard, > > I am not sure it is a good idea to render automatic labels in forms: > especially with text areas they are annoying. I would maybe have preferred > to get them the other way round, no labels unless explicitly declared. But > that is just my personal preference, definitely not a big problem. > > > > Il giorno martedì 19 marzo 2013 23:49:51 UTC+1, Richard ha scritto: >> >> The simpler is what you mention in model : >> >> db.define_talbe(... >> Field(..., label=''), >> ... >> >> You use this snippet to iterrate over your fields : >> [ db[request.args(0)][field].label = '' for field in >> db[request.args(0)].fields ] >> >> The other solution I see is custom form : >> >> http://web2py.com/books/default/chapter/29/07#Custom-forms >> >> And it much more work and not pratical when you modify your app >> frequently during developpement because you have to think about modifying >> your custom form each time... >> >> Hops it helps >> >> >> >> >> On Tue, Mar 19, 2013 at 1:13 PM, carlo <[email protected]> wrote: >> >>> How can I get SQLFORM not showing any label? >>> >>> I remembered labels=None but it's not working: only way I found is >>> passing a labels dict with mykey='', not very practical. >>> >>> By the way I am replicating the mywiki code from the manual: it coulf be >>> upgraded because "page" and "document", from the error I got, are now >>> reserved keywords. >>> >>> Carlo >>> >>> -- >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

