I assume those fields corresponds to fields in the table but are hidden because writable=False. You need to set writable=True after the form is created, before the form is accepted.
If web2py thinks they are not writable will not allow a client to write in them, as a security measure. Massimo On Aug 2, 3:19 pm, mattynoce <mattyn...@gmail.com> wrote: > hi, i have a question about hidden fields. > > i have a form that looks like this: > > fields=['f1','f2','f3'...] > hidden=dict(fieldname=val) > > form = SQLFORM(db.table, fields=fields, showid=False, hidden=hidden) > > in the view it's simply {{=form}} > > when i look at the view, there's a hidden input field for my hidden > field. however, when i do the insert, the hidden field is not getting > inserted into my db. the accept info is: > > if form.accepts(request.vars,session): > session.flash='Added' > redirect(URL(r=request, f="function")) > > am i doing something wrong? why would the hidden field show up > properly in the view but not update the db? > > thanks, > > matt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---