If you modify data in the model, and controller has a reference to it, then the change will be visible in the controller.
But, FormHelper gets the values for de inputs from Controller::$data (it gets passed to view, then to helpers). So pull your changes back into Controller::$data['Model']. HTH, - Dardo Sordi. On Thu, Feb 14, 2008 at 10:16 AM, Dia <[EMAIL PROTECTED]> wrote: > > so there's no way to modify data in model and then see this change in > the controller ? > > On Feb 12, 11:07 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> > wrote: > > > put this in your controller: > > > > $this->data = $modifiedData; > > > > > > On Feb 12, 2008 7:17 PM, Dia <[EMAIL PROTECTED]> wrote: > > > > > > > > > hi > > > > > I know this question was already asked a few times and I read some > > > topics about it on this g.group but didn't find the answer I'm looking > > > for (found "put it in controller", for example) > > > > > so, how can I change the value of an attribute of a model in > > > beforeValidate and then see this change on the value displayed in the > > > form ? > > > > > example: > > > write 'foo' in the form > > > set the value of this field to 'bar' in beforeValidate > > > the value must be 'foo' to be validated so validation fails, ok > > > but I still see 'foo' in the form field, I should see 'bar' > > > > > ... ??? > > > > > thanks in advance > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
