Monday, April 2, 2012

Creating an interface for a one-to-many interface.

I have two models set up, LearningExperience and Project. One LearningExperience can have many Projects. I'm building an interface for adding and for editing LearningExperiences. So far, when adding or editing a LearningExperience, I'm planning on having a button that opens a modal window. In the modal window will be a short form for adding a new Project, and when it is closed it sends the data via Ajax, updates the database, then populates a list on the LearningExperience page with the new project. This makes sense on the Edit page, where I already have the LearningExperience in the database and therefore an ID to associate the new Project to. But how do I go about saving a new Project on a new LearningExperience, when I don't have an ID for the LearningExperience yet?

Thanks!

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: