Saving a form of propulsion in symfony: Incorrect object


I have a problem and don't really know where to look for the cause of it. I have a propel form that is created basing on an object. The object is not empty:

$form = ModelNameForm($modelObject);

then I do binding with the request data:




and finally save:

$result = $form->save();

The thing is that after binding the $form->getObject() returns the initial object although the $request->getParameter($form->getName()) contains correct values. What's more interesting is that after $form->save() the $form->getObject() gets the right values. The cause of it can be in the code but I don't have a clue where to look for it. Under what circumstances the form object may contain the old data after binding but show the new when I do var_dump after saving?

This is the expected behavior of an sfForm. When you bind tainted values to the form its contained object won't know anything about those new values until you save the form. Binding allows you to validate the form, and if validation passes then you pass those new values into the object by calling $form->save(). I would suggest reading the symfony 1.4 Forms guide here: