Can we see the view? Regarding pre-populating an upload field, what do you mean? Do you want to provide a default file, or do you somehow want to identify a file on the user's machine?
Anthony On Tuesday, March 26, 2013 9:07:43 AM UTC-4, smoggy wrote: > > Hi Folks, > > So I cannot submit SQLFORM, even the simpler ones like the following. I > always get the "else:" that says "please fill the form" > I checked and it seems the code is alright and i can submit forms and add > content using the badmin plugin, so i'm kind of lost here. > > And another question, how can we pre-populate the upload field with > request.vars ? > > in models.py > > db.define_table('t_asd', > Field('id','id'), > Field('f_app',type='string', default='abc',label=T('Parent > App'),comment=T('The application or addon that will load this.')) > ) > > in controller.py > > @auth.requires_login() > def register_addon3(): > form = SQLFORM(db.t_asd) > if form.process().accepted: > print("Addon added, waiting for moderator approval to show on the > addon store.") > response.flash = 'Addon added, waiting for moderator approval to > show on the addon store.' > elif form.errors: > print("form has errors.") > response.flash = 'form has errors' > else: > print("please fill the form.") > response.flash = 'please fill the form' > return dict(form=form) > > -- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.