I am using two models ‘User’ and ‘UserImage’.. Where in i am going to save multiple rows into user_images table.. The view for UserImage is below..
echo $this->Form->input('UserImage.0.photo');
echo $this->Form->input('UserImage.1.photo');
echo $this->Form->input('user_id');
echo $this->Form->end(__('Submit'));
Then how to save multiple rows..
You should specify the model of each field if you have more models involved.
Also, you need to specify for each record the related field (user_id).
Try this:
Plus use this to save multiple records and multiple models: