Symfony forms by default use arrays, you've maybe just never noticed?

<input type="text" name="user[email]" />
<input type="text" name="user[comment]" />

when posted this is an array... post array: array("user" =>
array("email" => "something", "comment" => "somethingelse"));

It helps when binding the form, because then you just pass the "user"
part and not any other junk that may have been posted with the page.

Russ

On Feb 22, 9:42 pm, Samuel Morhaim <samuel.morh...@gmail.com> wrote:
> This is maybe a regular html forms question, not neccesarily Symfony..
> but.. how do I send an Array over a Form? is it possible? I have a
> hidden field, and I would want to send an Array in it.. is this
> possible?
>
> Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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