[symfony-users] Re: bind a form manually with embedded forms

2009-07-13 Thread Matthew Penrice
i would actually like to have the validation as well. I have found a way -
call the getEmbeddedForms to get embedded forms then call bind on each. Just
thought the way bind() worked was to take an input and populate all its
fields (embedded forms also contributing their fields). I'm sure this is
down to the format of the array i'm passing in. Anyway, no great worries.

On Mon, Jul 13, 2009 at 8:30 PM, Gandalf  wrote:

>
> Call the embed method of each form, and I usually use the setdefaults
> method instead of the bind to prepopulate the forms, because the bind
> validates the form.
>
> P
>
> On 7/13/09, Matthew Penrice  wrote:
> > Hello,
> >
> > I'm using a form which is made of 2 forms via embedForm(). I'm attempting
> to
> > prepopulate the form by calling bind with an array of values before it is
> > rendered. This works well but the embedded() form does not pick up the
> > values. This is probably just the format of the array i am using.
> >
> > This is the yml that is used in the bind call:
> >
> > description: 'test description'
> > storage_class: Subversion
> > created_at: '2008-08-28 16:54:00'
> > updated_at: '2009-03-05 17:47:42'
> > ProjectConfig:
> >   images_type: Subversion
> >   images_location: http://showroom/images
> >
> >
> > The ProjectConfig is a valid relation for the form's object. Can anyone
> help
> > me with this?
> >
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[symfony-users] Re: bind a form manually with embedded forms

2009-07-13 Thread Gandalf

Call the embed method of each form, and I usually use the setdefaults
method instead of the bind to prepopulate the forms, because the bind
validates the form.

P

On 7/13/09, Matthew Penrice  wrote:
> Hello,
>
> I'm using a form which is made of 2 forms via embedForm(). I'm attempting to
> prepopulate the form by calling bind with an array of values before it is
> rendered. This works well but the embedded() form does not pick up the
> values. This is probably just the format of the array i am using.
>
> This is the yml that is used in the bind call:
>
> description: 'test description'
> storage_class: Subversion
> created_at: '2008-08-28 16:54:00'
> updated_at: '2009-03-05 17:47:42'
> ProjectConfig:
>   images_type: Subversion
>   images_location: http://showroom/images
>
>
> The ProjectConfig is a valid relation for the form's object. Can anyone help
> me with this?
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---