When I put a debug statement before the validation, all the data is there as I would expect, but.. the strange thing is, it prints twice. The second time, the data is no longer in $this->Event->data as it seems to have been cleared which then makes my for loop fail. I have no idea why it gets called a 2nd time as it returned true to the validation rule (debug confirmed this) the first time. I thought it might have had something to do with the fact that I had 2 different fields for the same kind of role (this is ok, the event type allows for multiple roles to be assigned to this event) but when I changed the code to have 3 fields instead of just 2, it still only ran twice, again failing the 2nd time. Is there maybe a way I can save the data to a session then use that? It seems really hacky but I'm not sure why cake is working the way it is. Thanks for the help.
~Michael
-- Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment