Re: [web2py] Re: Web3py FORM referenced fields
Thanks. That clarifies. Will fix later today. On Wednesday, 12 June 2019 23:25:26 UTC-7, John Bannister wrote: > > Hi Massimo, > > > > Issue is not the dropdown for referenced fields on an Add rec as that > works fine. Issue is when you want to edit a record with a referenced field > so > > > > form=Form(db.order, record=id) > > > > Referenced field is blank (although dropdown is available). All other > fields are populated with db values. > > > > BR > > John > > > > > > > > *From:* web2py@googlegroups.com [mailto:web2py@googlegroups.com] *On > Behalf Of *Massimo Di Pierro > *Sent:* 13 June 2019 05:09 > *To:* web2py-users > *Subject:* [web2py] Re: Web3py FORM referenced fields > > > > I added an example that works for me. > > Maybe can help you debug the problem: > > > > http://127.0.0.1:8000/examples/dbform2 > > > On Wednesday, 12 June 2019 04:02:18 UTC-7, John Bannister wrote: > > Hi All, > > > > Does anyone have a working example of web3py Form using referenced fields? > > > > I have created the standard person / pets tables with pets referencing > person as 'reference person' in the table definition. > > > > Using form=Form(db.pet) I get the dropdown of persons for the add no > worries but on the form=Form(db.pet, record=id) for the edit form .. > neither the id of the person or the persons name (format='%(name)s' is > displayed even though I can still select from the dropdown list. The id is > definately stored in the db. > > > > BR > > John > > > > > > > > > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/d40dcdf9-96c9-43a3-a9ab-d1c3090c7ed1%40googlegroups.com > > <https://groups.google.com/d/msgid/web2py/d40dcdf9-96c9-43a3-a9ab-d1c3090c7ed1%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/0973acf7-c76b-4c8e-a5a3-4db3775e96b5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
RE: [web2py] Re: Web3py FORM referenced fields
Hi Massimo, Issue is not the dropdown for referenced fields on an Add rec as that works fine. Issue is when you want to edit a record with a referenced field so form=Form(db.order, record=id) Referenced field is blank (although dropdown is available). All other fields are populated with db values. BR John From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Massimo Di Pierro Sent: 13 June 2019 05:09 To: web2py-users Subject: [web2py] Re: Web3py FORM referenced fields I added an example that works for me. Maybe can help you debug the problem: http://127.0.0.1:8000/examples/dbform2 On Wednesday, 12 June 2019 04:02:18 UTC-7, John Bannister wrote: Hi All, Does anyone have a working example of web3py Form using referenced fields? I have created the standard person / pets tables with pets referencing person as 'reference person' in the table definition. Using form=Form(db.pet) I get the dropdown of persons for the add no worries but on the form=Form(db.pet, record=id) for the edit form .. neither the id of the person or the persons name (format='%(name)s' is displayed even though I can still select from the dropdown list. The id is definately stored in the db. BR John -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/d40dcdf9-96c9-43a3-a9ab-d1c3090c7ed1%40googlegroups.com <https://groups.google.com/d/msgid/web2py/d40dcdf9-96c9-43a3-a9ab-d1c3090c7ed1%40googlegroups.com?utm_medium=email_source=footer> . For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/005701d521b0%24c44dc750%244ce955f0%24%40gmail.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web3py FORM referenced fields
I added an example that works for me. Maybe can help you debug the problem: http://127.0.0.1:8000/examples/dbform2 On Wednesday, 12 June 2019 04:02:18 UTC-7, John Bannister wrote: > > Hi All, > > Does anyone have a working example of web3py Form using referenced fields? > > I have created the standard person / pets tables with pets referencing > person as 'reference person' in the table definition. > > Using form=Form(db.pet) I get the dropdown of persons for the add no > worries but on the form=Form(db.pet, record=id) for the edit form .. > neither the id of the person or the persons name (format='%(name)s' is > displayed even though I can still select from the dropdown list. The id is > definately stored in the db. > > BR > John > > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/d40dcdf9-96c9-43a3-a9ab-d1c3090c7ed1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web3py FORM referenced fields
thanks for reporting this. please open a web3py ticket and will look into this shortly. On Wednesday, 12 June 2019 04:02:18 UTC-7, John Bannister wrote: > > Hi All, > > Does anyone have a working example of web3py Form using referenced fields? > > I have created the standard person / pets tables with pets referencing > person as 'reference person' in the table definition. > > Using form=Form(db.pet) I get the dropdown of persons for the add no > worries but on the form=Form(db.pet, record=id) for the edit form .. > neither the id of the person or the persons name (format='%(name)s' is > displayed even though I can still select from the dropdown list. The id is > definately stored in the db. > > BR > John > > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/4ad545c8-9616-4647-acca-719bf077e892%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.