views:

174

answers:

1

Hey

I am trying to modify the default value of a form field every time the form is updated. I have tried to edit the $form->bind in my processForm (..) but I am unsure how to do so.

Is it possible to get some example code or any approaches to do?

The field name is 'processed' and I am trying to set the value to 'false' - Using Symfony 1.4 (Propel)

A: 

In the action, you can directly modify the values from the request before binding them to the form:

$parameters = $request->getParameter('nameofyourform');
$parameters['fieldyouwanttochange'] = 'newvalue';
$yourform->bind($parameters);
kaore