Yes, and you also have the option 'noNewForm' set to true which, obviously, 
discards the form to add a new related object. :)

Cheers, Daniel

Sent from my iPhone4

On Nov 12, 2010, at 4:10 AM, thronic <sean.vill...@gmail.com> wrote:

> Upon further reading i realized that i had to add "new_RELATIONNAME"
> to my generator.yml!
> 
> 
> 
> 
> On Nov 11, 10:02 pm, thronic <sean.vill...@gmail.com> wrote:
>> I've added the embedRelations call and i can see (and edit and delete)
>> my relations when i edit the parent record. But for some reason I
>> can't add a relation.  How do i add a relation?? Am i missing
>> something in my embedRelations method?
>> 
>> $this->embedRelations(array(
>>           'RestaurantMenuItemOptions' => array(
>>               'considerNewFormEmptyFields'    => array('name',
>> 'description'),
>>               'noNewForm'                     => true,
>>               'newFormLabel'                  => 'New Menu Item
>> Option!!!',
>>               'newFormClass'                  =>
>> 'RestaurantMenuItemOptionsEmbedForm',
>>               'newFormClassArgs'              => array(array('sf_user'
>> => $this->getOption('sf_user'))),
>>               'displayEmptyRelations'         => true,
>>               'formClass'                     =>
>> 'RestaurantMenuItemOptionsEmbedForm',
>>               'formClassArgs'                 =>
>> array(array('ah_add_delete_checkbox' => true)),
>>               'newFormAfterExistingRelations' => true,
>>               'formFormatter'                 => null,
>>               'multipleNewForms'              => true,
>>               'newFormsInitialCount'          => 2,
>>               'newFormsContainerForm'         => null, // pass
>> BaseForm object here or we will create ahNewRelationsContainerForm
>>               'newRelationButtonLabel'        => '+',
>>               'newRelationAddByCloning'       => true,
>>               'newRelationUseJSFramework'     => 'jQuery',
>>               'customEmbeddedFormLabelMethod' => 'getLabelTitle'
>>             )
>>         ));
> 
> -- 
> 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

Reply via email to