This a good and interesting problem ;) What I knew about sub-forms was done using XFA -> xml forms architecture. This was designed to offer intelligence to forms (I.e. as is, on the web and, of course, in PDF). But... that was a beast in itself. I'm not too sure how to go about this with web2py, but web2py is quite the framework in itself and by having to not only to the Gluon libs but also to python at the first layer (in the html itself), I'm certain that something just as fantastic can be achieved. Binding forms to other forms, or there field data as separate forms should be very do-able. Perhaps looking into a "container" model would be a way to get there? I.e. container A contains maybe a form with customer info, where the data entered can be accessed by container B (defined conditionally) which perhaps contains another Form in overall customer approval process. Both forms separate but acting a a single form (each manageable independently either at the admin level of at the user level (eg. for updates)... ? Once there adding routing capability should be do-able as well (if not already featured in web2py).... there are other ways as well, I think it boiles down to a question of choice and whatever if more efficient (and whatever integrates the best with Massimo's great framework).
Had I more time, I'd would love take a crack at this (I already need to find the time for some release/source control related tasks discussed in a previous thread as well as the crazy workload of my unending day (and just as crazy) job). but, IMHO, this is a worthy effort and do hope someone makes something with this idea! Mart :) On Sep 3, 6:07 pm, "portly.shor...@googlemail.com" <portly.shor...@googlemail.com> wrote: > I completely agree - one of the really nice things about Django is > that it allows you to have parent -> child models in a single form. > > The example from Dominic seems quite complex. Could anyone suggest > some ideas of how we could implement this functionality within Web2Py > - I'm happy to try and code something but as I'm new to Web2Py I'm not > even sure where to start. > > any help at all would be appreciated. > > Kind Regards > > Portly > > On Sep 3, 9:39 pm, mart <msenecal...@gmail.com> wrote: > > > This sounds a lot like sub-forms (ends up being part of the form, but > > can be managed separately, even at run time). I worked on Adobe's Form > > designer (which is bundled with a full version of Acrobat)... if we we > > don't have sub-forms in web2py, I would strongly recommend we create > > them :) > > > Mart > > > On Sep 3, 4:14 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > you are right it would not but it may be a way to store multiple > > > addresses (as a list of strings) without creating a table of > > > addresses. > > > > On Sep 3, 1:10 pm, "portly.shor...@googlemail.com" > > > > <portly.shor...@googlemail.com> wrote: > > > > Hi Mdipierro > > > > > firstly thank you so much for Web2Py - the more I look into it the > > > > more I love it. > > > > > I'm slightly confused by your answer however - how would list:string > > > > help me input data for two models at once? > > > > > kind regards > > > > > Portly > > > > > On Sep 3, 5:38 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > > With the new list:string it should be easy to create a widget for it. > > > > > WIll look into it. > > > > > > On Sep 3, 10:14 am, "portly.shor...@googlemail.com" > > > > > > <portly.shor...@googlemail.com> wrote: > > > > > > Thank you very much for this Dominic. I've had a quick look and > > > > > > there > > > > > > is a lot to take in (I guess I was hoping for a much simpler > > > > > > solution > > > > > > lol). > > > > > > > regards > > > > > > > Portly > > > > > > > On Sep 3, 1:28 pm, Dominic <dominic.koe...@googlemail.com> wrote: > > > > > > > > We (Sahana-Eden) use to do such things with web2py, in connection > > > > > > > with > > > > > > > a RESTful API. > > > > > > > > See for > > > > > > > example:http://vita.sahanafoundation.org/eden/pr/person/1http://vita.sahanafo... > > > > > > > > It can also speak several XML formats, of course, and > > > > > > > JSON;http://vita.sahanafoundation.org/eden/pr/person/1.xmlhttp://vita.saha... > > > > > > > > The code behind that looks like: > > > > > > > > Person > > > > > > > Model:http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%...... > > > > > > > > The actual Person > > > > > > > controller:http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%... > > > > > > > > HTML frontend > > > > > > > controller:http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%... > > > > > > > > Backend > > > > > > > extensions:http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/head%... > > > > > > > > Regards, > > > > > > > Dominic > > > > > > > > On 3 Sep, 13:38, "portly.shor...@googlemail.com" > > > > > > > > <portly.shor...@googlemail.com> wrote: > > > > > > > > Is it possible to edit a parent + child model as a single form > > > > > > > > and > > > > > > > > automatically create both the parent and respective children in > > > > > > > > the > > > > > > > > database. > > > > > > > > > As an example, say I have a Person model and the person can have > > > > > > > > multiple Addresses. Is it possible to create a Person and add > > > > > > > > several > > > > > > > > addresses on a single form at the same time. > > > > > > > > > Out of the box with Web2Py I know this is not possible but as > > > > > > > > it is a > > > > > > > > common situation I'm sure someone has already solved this > > > > > > > > particular > > > > > > > > problem. > > > > > > > > > Many Thanks in advance for any help. > > > > > > > > > Portly.- Hide quoted text - > > > > > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text - > >