You might want to take a look at this: http://www.symfony-project.org/plugins/ahDoctrineEasyEmbeddedRelationsPlugin
Cheers, Daniel On 01.07.2010, at 06:04, antonydb wrote: > Hello, > > I'm having trouble validating a form. I have embedded another form > within it n times, where n is a number that can vary. > > The validation seems to pass without error if the object is being > updated. However on insert the validator gives me the error: > > Unexpected extra form field named "value1", Unexpected extra form > field named "value2", Unexpected extra form field named "value3" > > I was hoping someone could shed some light on the best process for > embedding one form inside another n times. > > > I have a validator within my embedded form: > > $this->validatorSchema['value'] = new > sfValidatorString( array('required' => true)); > > And I'm embedding it with a for loop: > > foreach ($object_list as $n => $object) > { > $this->embedForm('object'.$n, new ObjectForm($object)); > } > > > And I guess on insert it validates properly for the first embedded > form as I am not receiving the error "Unexpected extra form field > named "value0". > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en