[symfony-users] Re: How to declare an array of input field with sfForm?

2009-11-16 Thread Gareth McCumskey
Make your widget name "name_of_field[]". When symfony recieves a post variable like that $request->getPostParameter('name_of_field') returns an array On Sat, Nov 14, 2009 at 10:02 PM, Sid Bachtiar wrote: > > Hi, > > How to declare an array of input field in sfForm? Is this where > embedded form

[symfony-users] Re: How to declare an array of input field with sfForm?

2009-11-16 Thread Jesse B. Hannah
One way to do this is with embedded forms. A good example is available at http://trac.symfony-project.org/ticket/4906#comment:13, but here's a quick rundown of it: $form = new sfForm(); for ($i = 1; $i <= 5; $i++) { $form->widgetSchema[$i] = new sfWidgetFormInputFile(); $form->widgetSchema->set

[symfony-users] Re: How to declare an array of input field with sfForm?

2009-11-16 Thread Sid Bachtiar
Hi, Thanks for all the responses. In the end I use embedForm :) On Tue, Nov 17, 2009 at 7:45 AM, Jesse B. Hannah wrote: > > One way to do this is with embedded forms. A good example is available > at http://trac.symfony-project.org/ticket/4906#comment:13, but here's > a quick rundown of it: >

[symfony-users] Re: How to declare an array of input field with sfForm?

2009-12-23 Thread Dennis
I wonder if while returning an array of files via ajax, to a form that that only expects a single file, (no array of file validators), if it will validate? Perhaps making a form that has multiple widgets but only one validator of the same name might be a good test, (Providing Symfony doesn't check