Code Comments
Programming Forum and web based access to our favorite programming groups.On Mon, 29 Nov 2004 16:51:57 -0800, Ken Restivo <ken@restivo.org> wrote: > On Mon, Nov 29, 2004 at 03:10:42PM -0800, Justin Patrin wrote: kind of schema. > > My understanding of crosslinks and triplelinks, is that they generate a bunch of checkboxes. That's not what I'm talking about. I'm talking about how one enters and links back and forth to editing the crosslinked records. As a bonus, I need to show all the data for those sub-records in tabular form as a sub-table-- not just $fb_linkDisplayFie lds. > > Simple example: let's say, using the above schema, that I want to display all the data for a user, including all his or her cars. *Only* his or her cars. Likewise, I want to be able to add a new user, then add the cars for that user. Or, when editin g t hat user's data, be able to add a new car to their record or delete one. > > Sure, I could use crosslinks to show an array of *every* car in the database, rega rdless whether it has anything to do with this user, and check off which are his or hers. But that's impractical in a database of hundreds of records, and it isn't what I' m trying to do anyway. > > I'm not sure I'm explaining myself very well, but suffice to say I'm prett y confident that crosslinks are going to do it. > True, the crosslinks code isn't practical for lots and lots of entries. In this case you have to do something on your own. If all you need to do is enter new car records which are connected to a person you could easily just make the car link back to the person. Then auto-fill the link field with the person's ID. Or, if you want to have the many-many relationship you can auto-enter a record in the man-many table based on the chosen user, then when you want to add a car just show the form for the many-many table with the user auto-selected. For the auto-selected parts you could even make a static form element and set it yourself (using preGenerateForm / preProcessForm, etc.). -- Justin Patrin
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.