Hello,
I have two objects (tables) - categories and banners. Each category
can have 2 baners - small and big. To assign a banner to a category I
use third object (table) category_to_banner (category_id, banner_id,
banner_type), where banner_type is use to distinguish big/small
banners.
I want to display one form for category creation/update but I'm not
sure if it is possible with auto generated xxxForm classes. The
problem is that this form have to work with 3 related tables (4 if I
count category i18n table :-) )
I'm playing with
CategoryForm::configure() {
$bannerForm = new BannerForm();
$this->embedFormForEach('banners',$bannerForm, 2);
// unset some fields
}
and In my form I have 2 fields for banners. Just for the tests I left
them pure input fields. When I populate the fields the record in
categories table is created, but there are no records in banners table
(I use $form->save()).
Which is correct way to use embed forms and if it is possible to meet
my requirements with them ? May be I'll have to create manually this
form and it's save() method.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---