[web2py] Re: automatically populate child field with parent field

2013-03-18 Thread Alex Glaros
Thanks Richard, I'll post a simplified version of my question on a new thread. Alex On Sunday, March 17, 2013 12:13:58 AM UTC-7, Alex Glaros wrote: > > I'm trying to automatically populate child FK field "sharedServiceID" > using the controller below, but the field gets filled with "none" > > D

Re: [web2py] Re: automatically populate child field with parent field

2013-03-18 Thread Richard Vézina
Alex, I think you want to add input in the generated form and this is possible with jQuery but it leed to a list of values instead of value in your form.vars.var... This thread contains many informations about that : https://groups.google.com/d/msg/web2py/UK8NZ1VMlNk/lRqxKgS10ScJ But in your cas

[web2py] Re: automatically populate child field with parent field

2013-03-18 Thread Mark
Alex, Sorry, I don't have any related examples and don't know how to do it. I guess you may need a jquery dialog and a while loop, which continue to run until the dialog return "No". Mark On Monday, March 18, 2013 11:01:27 AM UTC-4, Alex Glaros wrote: > > It worked. Thanks Mark. > > Can you

[web2py] Re: automatically populate child field with parent field

2013-03-18 Thread Alex Glaros
It worked. Thanks Mark. Can you provide a link to any examples where user has the ability to enter a variable number of children? I mean once they type in the parent and one child, something like prompt is displayed asking "do you want to add another child record?". This would let them enter

[web2py] Re: automatically populate child field with parent field

2013-03-18 Thread Mark
try form.vars.sharedServiceID=sharedServiceID On Sunday, March 17, 2013 3:13:58 AM UTC-4, Alex Glaros wrote: > > I'm trying to automatically populate child FK field "sharedServiceID" > using the controller below, but the field gets filled with "none" > > Do you see any flaw in the controller for

[web2py] Re: automatically populate child field with parent field

2013-03-17 Thread Alex Glaros
oops, forgot to add "writable=False,readable=False" attributes to sharedServiceID in model. That helped. Now the sharedServiceID does not display to the user. But it still gets filled with "none" instead of the parent's ID Alex On Sunday, March 17, 2013 12:13:58 AM UTC-7, Alex Glaros wrote: >