Re: [symfony-users] Re: change name of checkbox without change id

2009-12-30 Thread DEEPAK BHATIA
Try this $m = 1; foreach ($this->getOption('param') as $i) { $temp = 'test'.$m; $temp1 = 'temp'; $m = $m + 1; $this->widgetSchema['comment'.$i['id']] = new sfWidgetFormInputCheckbox(array(), array('name' => $temp, 'id' =>$temp1)); } On Wed, Dec 30, 2009 at 7:19 PM, dziobacz wrote: >

Re: [symfony-users] Re: change name of checkbox without change id

2009-12-30 Thread DEEPAK BHATIA
I guess this holds for radiobutton and not checkboxAre you want to it for checkbox ? Do you want to select one checkbox at a time ? On Wed, Dec 30, 2009 at 7:09 PM, dziobacz wrote: > Now they have different names but they should have the same names and > different ID: > > > > > > On 30 G

[symfony-users] Re: change name of checkbox without change id

2009-12-30 Thread dziobacz
ok thx - now is ok - only 1 thing: not: $temp = 'test'.$m; but: $temp = 'test'; :) On 30 Gru, 14:42, DEEPAK BHATIA wrote: > Try this > $m = 1; > foreach ($this->getOption('param') as $i) > { >         $temp = 'test'.$m; >         $temp1 = 'temp'.$m; >         $m = $m + 1; >          $this->w

[symfony-users] Re: change name of checkbox without change id

2009-12-30 Thread dziobacz
heh - again wrong :) On 30 Gru, 14:42, DEEPAK BHATIA wrote: > Try this > $m = 1; > foreach ($this->getOption('param') as $i) > { >         $temp = 'test'.$m; >         $temp1 = 'temp'.$m; >         $m = $m + 1; >          $this->widgetSchema['comment'.$i['id']] = new >   sfWidgetFormInput

Re: [symfony-users] Re: change name of checkbox without change id

2009-12-30 Thread DEEPAK BHATIA
Try this $m = 1; foreach ($this->getOption('param') as $i) { $temp = 'test'.$m; $temp1 = 'temp'.$m; $m = $m + 1; $this->widgetSchema['comment'.$i['id']] = new sfWidgetFormInputCheckbox(array(), array('name' => $temp, 'id' => $temp1)); } On Wed, Dec 30, 2009

[symfony-users] Re: change name of checkbox without change id

2009-12-30 Thread dziobacz
Now they have different names but they should have the same names and different ID: On 30 Gru, 14:34, DEEPAK BHATIA wrote: > Try this > $m = 1; > foreach ($this->getOption('param') as $i) > { >        $temp = 'test'.$m; >        $m = $m + 1; >         $this->widgetSchema['comment'.$i['id'

Re: [symfony-users] Re: change name of checkbox without change id

2009-12-30 Thread DEEPAK BHATIA
Try this $m = 1; foreach ($this->getOption('param') as $i) { $temp = 'test'.$m; $m = $m + 1; $this->widgetSchema['comment'.$i['id']] = new sfWidgetFormInputCheckbox(array(), array('name' => $temp)); } On Wed, Dec 30, 2009 at 6:43 PM, dziobacz wrote: > I still have:

[symfony-users] Re: change name of checkbox without change id

2009-12-30 Thread dziobacz
I still have: So I can't do that what I want in Symfony forms and I must use normal forms ? :O On 30 Gru, 08:59, DEEPAK BHATIA wrote: > Try this > > foreach ($this->getOption('param') as $i) > { >       $temp = 'test'.$i; >        $this->widgetSchema['comment'.$i['id']] = new > sfWidgetF