Re: [web2py] Re: How can I pre populate a option column of a form?

2016-04-28 Thread Andrea Marin
Thanks for this method Il giorno giovedì 28 aprile 2016 20:10:46 UTC+2, Val K ha scritto: > > 'form.vars.field = any' must be placed before form.process() > So, in your case: > form = SQLFORM(db.pratiche) > form.vars.stato_pratica = 'aperta' > > if form.process().accepted: > >

Re: [web2py] Re: How can I pre populate a option column of a form?

2016-04-28 Thread Val K
'form.vars.field = any' must be placed before form.process() So, in your case: form = SQLFORM(db.pratiche) form.vars.stato_pratica = 'aperta' form.add_button('Back', URL('index')) if form.process().accepted: On Friday, April 22, 2016 at 12:23:59 AM UTC+3, Andrea Marin wrote: > >

Re: [web2py] Re: How can I pre populate a option column of a form?

2016-04-21 Thread Andrea Marin
Trans a lot > Il giorno 21 apr 2016, alle ore 05:22, Michael Beller ha > scritto: > > before you call SQLFORM, insert: > db.pratiche.stato_pratica.default = 'aperta' > > > >> On Wednesday, April 20, 2016 at 6:05:06 PM UTC-4, Andrea Marin wrote: >> Hi I have this type of form in my model fil

[web2py] Re: How can I pre populate a option column of a form?

2016-04-20 Thread Michael Beller
before you call SQLFORM, insert: db.pratiche.stato_pratica.default = 'aperta' On Wednesday, April 20, 2016 at 6:05:06 PM UTC-4, Andrea Marin wrote: > > Hi I have this type of form in my model file: > > db.define_table('pratiche', > Field('nome', requires=IS_NOT_EMPTY()), >