try adding url to your form: $form->create('Contact', array('url' =>
array('controller' => 'contacts', 'action' => 'add')));On Sep 8, 1:28 am, BrAt <[email protected]> wrote: > Hi , i am new to cakePHP , in order to learn php i am just making my > first test application which is > a simple telephone directory. > in my database there are two entities named contacts and phone_numbers > which has One-to-Many relationship. > > Now i have a form in contacts view "add.ctp" , i want that single form > to add Contact as well as the numbers. so by clicking add button > Contact, data should be stored in contacts table and phone number > should be stored in phone_numbers. i have added another form for phone > number and i m dynamically adding fields for input of phone number > using javascript. > But when the user clicks add button the data we put in phoneNumber > form also goes to ContactsController, > > Now is there any way to send my PhoneNumber data to > PhoneNumbersController to add action ,so that i can save that data in > phone_numbers table. or any other way to do this job. > > i ll be really thankfull. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
