Hi all

i have 2 models
Customer hasMany Phonenumber

my "customers/add" view has a form with a html table where a user can enter 
multiple phone numbers (up to five) for each customer.

Each phone number is referenced as 

Phonenumber.0.number
Phonenumber.0.description

Phonenumber.1.number
Phonenumber.1.description
and so on.

When i fire the saveAll() function the Phonenumber model throws many 
validation errors beacuse the field "number" is mandatory.
That's because Cake is processing the empty records.
I solved overriding the saveAll() function, looping through the data array 
and unsetting the blank records, but this solution looks kinda nasty to me.

is there any way to do this from a behavior?

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to