Yes, this is totally possible - see this section: http://book.cakephp.org/view/1031/Saving-Your-Data. The secret is in getting your $this->data array into the right shape, then using either saveAll or save each model at a time.
Jeremy Burns [email protected] On 23 Mar 2010, at 18:13, Gianni Valenti wrote: > Hi all, > I tried to search among the past discussions and in the tutorials for > sub-forms or multi-level forms but I didn't find any helpful post. > > I'm trying to decide whether to switch from my own php class set > towards CakePHP framework and I would like to unserstand if CakePHP > can help me building multi-level forms to insert datas in tables like > the following ones: > > Companies (`id`, `name`, etc...) > -> CompanyPhoneNumbers (`id`, `company_id`, `number`, etc...) > -> CompanyEmailAddresses (`id`, `company_id`, `address`, etc...) > -> BankAccounts (`id`, `company_id`, etc...) > -> Contacts (`id`, `company_id`, `first_name`, `second_name`, etc...) > -> -> ContactPhoneNumbers (`id`, `contact_id`, `number`, etc...) > -> -> ContactEmailAddresses (`id`, `contact_id`, `address`, etc...) > > I need to build a single form - maybe with ajax "tabbed" subsections - > to insert these data for each company. > > Is CakePHP able to manage such type of structured data or should I > build the php code on my own? > > Thanks a lot, > Gianni > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > > To unsubscribe from this group, send email to > cake-php+unsubscribegooglegroups.com or reply to this email with the words > "REMOVE ME" as the subject. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
