going wrong:
function beforeValidate() {
$this->data['Model']['new_var'] = "my new variable";
}
then in my view I do:
pr($this->data);
My new_var variable is not present. Anyone know what's going on?
On Sep 2, 3:15 pm, Kyle Decot <kdec...@gmail.com> wrote:
> I am having a little bit of trouble w/ my $this->data. When someone
> submits the form, in my beforeValidate() method, I create two new
> variables inside of $this->data ($this->data['Model']['lat'] && $this->data['Model']['lng'])...I I then want to pass those back to the view
>
> if the validation of the rest of the form fails but when I pr($this->data) in my view, lat and lng are not there. How do I make sure those
>
> values are passed back? Thank you for any help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment