Reputation: 2148
I am using symfony1.4 with doctrine ORM. i have problem in edit form using formwidgets. I successfully added a record using formWidgets. I am having a datatable with Edit and Delete link with the record id and i want to edit it using the formwidgets. I am passing the id to the form as like this
$this->form = new TblallusersForm($id);
But it is requesting for object. The problem is how can i pass the id to the form as object Pl help me solve this.....
Upvotes: 0
Views: 630
Reputation: 34125
You need to retrieve the object first, then pass that instance to the form:
$object = Doctrine_Core::getTable("Tblallusers")->find($id);
$this->form = new TblallusersForm($object);
Upvotes: 3