[symfony-users] Re: sfForm->save() for an update

2009-09-03 Thread Krishan .G
))); > > if ($this->form->isValid()) { >$php_profile = $this->form->save(); > } > ------------------ > > Thanks > Avnish > > > Original Message > Subject: [symfony-users] Re: sfForm->save() for an update > Fr

[symfony-users] Re: sfForm->save() for an update

2009-09-03 Thread Avnish Pundir
s->form->bind($request->getParameter($this->form->getName())); if ($this->form->isValid()) {    $php_profile = $this->form->save(); } ------ Thanks Avnish ---- Original Message Subject: [symfony-users] Re: sfForm->save()

[symfony-users] Re: sfForm->save() for an update

2009-09-03 Thread Krishan .G
Using both solutions getting following error.. Cannot insert a value for auto-increment primary key [Profile.ID] :( On Mon, Aug 31, 2009 at 6:00 PM, Alexandre SALOME < alexandre.sal...@gmail.com> wrote: > 2 solutions : > > - check the id field is set and be sure it is rendered in form (hidden

[symfony-users] Re: sfForm->save() for an update

2009-08-31 Thread Alexandre SALOME
2 solutions : - check the id field is set and be sure it is rendered in form (hidden field : $form->renderHiddenFields()) - Add id to parameters : $this->form->bind(array_merge(array('id' => $id), $request->getParameter($this->form->getName(; Good luck 2009/8/31 krishan > > Friends I am