Mainly because I really get agitated when I have to do silly things such as
if do_captcha: form = SQLFORM.factory(db.table.field1, db.table.field2, db.table.field3, Field('anti_spam', widget=captcha, default='')) else: form = SQLFORM(db.table) -Thadeus On Sat, Nov 21, 2009 at 11:49 AM, Thadeus Burgess <thade...@thadeusb.com>wrote: > How do you append a Field() to SQLFORM? Does not look like it is possible. > > -Thadeus > > > > > > On Sat, Nov 21, 2009 at 11:47 AM, Thadeus Burgess > <thade...@thadeusb.com>wrote: > >> I believe it is the way that SQLFORM looks for data in request.vars. >> >> It will look for a var with the name of the field... >> >> so >> >> Field('recaptcha', widget=captcha) >> >> It is expecting a request.vars.recaptcha, which does not exist. >> >> You're right, setting default does fix it, sounds like a bug... >> >> So it seems that by setting a default, it is allowing SQLFORM to proceed, >> even though it is not getting anything from request.vars. >> >> I even tried setting the field name to recaptcha_response_field with no >> luck, but the default trick works! Lol you're awesome Freeze >> >> -Thadeus >> >> >> >> >> >> On Sat, Nov 21, 2009 at 11:34 AM, mr.freeze <nat...@freezable.com> wrote: >> >>> uld be able to create a form using SQLFORM(db.table) and then >>> > insert the recaptcha field aft >>> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---