Not sure I understand what this supposed to do. Would you explain it once more.
On Jan 22, 10:47 am, leone <[email protected]> wrote: > I suppose that my error is in setting the new value to field. > I am confused. > > def index(): > form = SQLFORM.factory ( > Field('autonumber','integer', requires=IS_AUTONUMBER > (progfile, 10000)), > ) > def upd_auto(form): > form.custom.autonumber = form.vars.autonumber > if form.accepts(request.vars, session, keepvalues=True, > onvalidation=upd_auto): > pass > return dict(form=form) > > Thanks > leone > > On 22 Gen, 17:34, DenesL <[email protected]> wrote: > > > Can you post your code? > > > On Jan 22, 11:14 am, leone <[email protected]> wrote: > > > > I done it, but when I update forms.vars.xxxx with the new value it is > > > not update in the form. > > > Have you a suggest? > > > leone > > > > On 22 Gen, 17:03, DenesL <[email protected]> wrote: > > > > > If I understand correctly you could use onvalidation. > > > > Example: > > > > > def your_action(): > > > > > def funcx(): > > > > # code that runs after validation > > > > > ... > > > > if form.accepts(..., onvalidation=funcx): > > > > ... > > > > > On Jan 22, 10:51 am, leone <[email protected]> wrote: > > > > > > I have a SQLFORM.factory with a Field that requires a custom class to > > > > > incremet a value. > > > > > It runs, but I can't understand how I can udate the field value after > > > > > form.accepts and before form is exposed. > > > > > Have same example? > > > > > Thanks > > > > > leone -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

